[Jifty-commit] r4628 - jifty/trunk/lib/Jifty/Web/Form

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Thu Dec 6 00:50:44 EST 2007


Author: clkao
Date: Thu Dec  6 00:50:43 2007
New Revision: 4628

Modified:
   jifty/trunk/lib/Jifty/Web/Form/Element.pm

Log:
Don't call _handler_setup unless the normalising accessor is
used as mutator.


Modified: jifty/trunk/lib/Jifty/Web/Form/Element.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Web/Form/Element.pm	(original)
+++ jifty/trunk/lib/Jifty/Web/Form/Element.pm	Thu Dec  6 00:50:43 2007
@@ -209,6 +209,8 @@
     no strict 'refs';
     *{$accessor} = sub {
         my $self = shift;
+        return $self->{$internal_method} unless @_;
+
         $self->$internal_method($self->_handler_setup($internal_method, @_));
     };
 }


More information about the Jifty-commit mailing list