[Jifty-commit] r1735 - in jifty/trunk: lib/Jifty/Web/Form
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Thu Aug 3 01:46:26 EDT 2006
Author: trs
Date: Thu Aug 3 01:46:26 2006
New Revision: 1735
Modified:
jifty/trunk/ (props changed)
jifty/trunk/lib/Jifty/Web/Form/Field.pm
jifty/trunk/lib/Jifty/Web/Form/Link.pm
Log:
r15050 at zot: tom | 2006-08-03 01:45:33 -0400
We need the anonymous subs because otherwise the method of the base class is always called, instead of the appropriate overridden method in a child class.
Modified: jifty/trunk/lib/Jifty/Web/Form/Field.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Web/Form/Field.pm (original)
+++ jifty/trunk/lib/Jifty/Web/Form/Field.pm Thu Aug 3 01:46:26 2006
@@ -46,7 +46,7 @@
use Scalar::Util;
use HTML::Entities;
-use overload '""' => \&render, bool => sub { 1 };
+use overload '""' => sub { shift->render }, bool => sub { 1 };
=head2 new
Modified: jifty/trunk/lib/Jifty/Web/Form/Link.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Web/Form/Link.pm (original)
+++ jifty/trunk/lib/Jifty/Web/Form/Link.pm Thu Aug 3 01:46:26 2006
@@ -18,7 +18,7 @@
use base 'Jifty::Web::Form::Element';
# Since we don't inherit from Form::Field, we don't otherwise stringify
-use overload '""' => \&render, bool => sub { 1 };
+use overload '""' => sub { shift->render }, bool => sub { 1 };
=head2 accessors
More information about the Jifty-commit
mailing list