[Jifty-commit] r2125 - jifty/trunk/lib/Jifty

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Thu Nov 9 14:15:27 EST 2006


Author: audreyt
Date: Thu Nov  9 14:15:26 2006
New Revision: 2125

Modified:
   jifty/trunk/lib/Jifty/Param.pm

Log:
* Jifty::Param - It's no longer a Jifty::Web::Form::Field subclass.

Modified: jifty/trunk/lib/Jifty/Param.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Param.pm	(original)
+++ jifty/trunk/lib/Jifty/Param.pm	Thu Nov  9 14:15:26 2006
@@ -15,9 +15,11 @@
 
 =head2 accessors
 
-See L<Jifty::Web::Form::Field> for the list of possible keys that each
-parameter can have.  In addition to the list there, you may use these
-additional keys:
+Although this class is not derived from B<Jifty::Web::Form::Field>,
+it does share the accessors from it; see L<Jifty::Web::Form::Field>,
+for the list of possible keys that each parameter can have.
+
+In addition to the list there, you may use these additional keys:
 
 =over
 
@@ -67,12 +69,19 @@
 =cut
 
 
-use base qw/Jifty::Web::Form::Field Class::Accessor::Fast/;
-use constant ACCESSORS => qw(constructor valid_values available_values sort_order);
+# We share accessors with Jifty::Web::Form::Field, but not its methods,
+# so it's not an inheritance relationsip.
+use Jifty::Web::Form::Field ();
+
+use base qw/Class::Accessor::Fast/;
+use constant ACCESSORS => (
+    Jifty::Web::Form::Field->accessors,
+    qw(constructor valid_values available_values sort_order),
+);
 
 __PACKAGE__->mk_accessors(ACCESSORS);
 
-sub accessors { (shift->SUPER::accessors(), ACCESSORS) }
+sub accessors { ACCESSORS }
 
 =head2 new
 
@@ -82,7 +91,6 @@
 
 =cut
 
-# Inhibit the reblessing inherent in Jifty::Web::Form::Field->new
 sub new {
     my $class = shift;
     $class->Class::Accessor::Fast::new({


More information about the Jifty-commit mailing list