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

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Wed Aug 2 23:58:46 EDT 2006


Author: clkao
Date: Wed Aug  2 23:58:40 2006
New Revision: 1733

Modified:
   jifty/trunk/lib/Jifty/Web/Form/Field.pm
   jifty/trunk/lib/Jifty/Web/Form/Link.pm

Log:
misc cleanups.

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	Wed Aug  2 23:58:40 2006
@@ -46,7 +46,7 @@
 
 use Scalar::Util;
 use HTML::Entities;
-use overload '""' => sub { shift->render}, bool => sub { 1 };
+use overload '""' => \&render, bool => sub { 1 };
 
 =head2 new
 
@@ -332,7 +332,8 @@
 
 sub classes {
     my $self = shift;
-    return join(' ', ($self->class||''), ($self->name ? "argument-".$self->name : ''));
+    my $name = $self->name;
+    return join(' ', ($self->class||''), ($name ? "argument-".$name : ''));
 }
 
 

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	Wed Aug  2 23:58:40 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 '""' => sub { shift->render}, bool => sub { 1 };
+use overload '""' => \&render, bool => sub { 1 };
 
 =head2 accessors
 


More information about the Jifty-commit mailing list