[Jifty-commit] r1597 - jifty/branches/moose/lib/Jifty
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Mon Jul 17 02:32:18 EDT 2006
Author: audreyt
Date: Mon Jul 17 02:32:18 2006
New Revision: 1597
Added:
jifty/branches/moose/lib/Jifty/Param.pm
Modified:
jifty/branches/moose/lib/Jifty/Action.pm
Log:
* Introduce the Jifty::Param class, foundation for introspectable parameters.
* Jifty::Action - fix misdocumentation about "ajax_canonicalizes" (it is
used in ::Field, not a param-specific slot), and begin to add in PARAMS
plumbing. I'd like to factor out the schema-creation magick entirely
into its own module.
Modified: jifty/branches/moose/lib/Jifty/Action.pm
==============================================================================
--- jifty/branches/moose/lib/Jifty/Action.pm (original)
+++ jifty/branches/moose/lib/Jifty/Action.pm Mon Jul 17 02:32:18 2006
@@ -17,7 +17,7 @@
=cut
-use base qw/Jifty::Object/;
+use base qw/Jifty::Object Class::Data::Inheritable/;
use Moose;
has moniker => qw( is rw isa Str );
has argument_values => qw( is rw isa HashRef );
@@ -27,6 +27,8 @@
has sticky_on_failure => qw( is rw isa Bool );
no Moose;
+__PACKAGE__->mk_classdata(qw/PARAMS/);
+
=head1 COMMON METHODS
=head2 new
@@ -157,21 +159,13 @@
Defaults to false.
-=item ajax_canonicalizes
-
-This key takes a boolean value that determines if the value displayed in
-the form field is updated via AJAX with the result returned by this argument's
-L<canonicalize|Jifty::Manual::Glossary/canonicalize> function.
-
-Defaults to false.
-
=back
=cut
sub arguments {
my $self= shift;
- return {}
+ return($self->PARAMS || {});
}
=head2 run
Added: jifty/branches/moose/lib/Jifty/Param.pm
==============================================================================
--- (empty file)
+++ jifty/branches/moose/lib/Jifty/Param.pm Mon Jul 17 02:32:18 2006
@@ -0,0 +1,25 @@
+use warnings;
+use strict;
+
+package Jifty::Param;
+
+=head1 NAME
+
+Jifty::Param - Parameters for Jifty actions
+
+=head1 DESCRIPTION
+
+C<Jifty::Action> is the meat of the L<Jifty> framework; it controls
+how form elements interact with the underlying model. See also
+L<Jifty::Action::Record> for data-oriented actions, L<Jifty::Result>
+for how to return values from actions.
+
+=cut
+
+
+use base qw/Jifty::Web::Form::Field/;
+use Moose;
+has constructor => qw( is rw isa Bool ); # XXX - bad name
+no Moose;
+
+1;
More information about the Jifty-commit
mailing list