[Catalyst-commits] r8296 - in
CatalystX-CRUD/CatalystX-CRUD-Controller-RHTMLO/trunk: .
lib/CatalystX/CRUD/Controller
karpet at dev.catalyst.perl.org
karpet at dev.catalyst.perl.org
Tue Aug 26 21:20:37 BST 2008
Author: karpet
Date: 2008-08-26 21:20:37 +0100 (Tue, 26 Aug 2008)
New Revision: 8296
Modified:
CatalystX-CRUD/CatalystX-CRUD-Controller-RHTMLO/trunk/Changes
CatalystX-CRUD/CatalystX-CRUD-Controller-RHTMLO/trunk/lib/CatalystX/CRUD/Controller/RHTMLO.pm
Log:
move create() to core Controller
Modified: CatalystX-CRUD/CatalystX-CRUD-Controller-RHTMLO/trunk/Changes
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD-Controller-RHTMLO/trunk/Changes 2008-08-26 15:20:04 UTC (rev 8295)
+++ CatalystX-CRUD/CatalystX-CRUD-Controller-RHTMLO/trunk/Changes 2008-08-26 20:20:37 UTC (rev 8296)
@@ -64,4 +64,7 @@
0.17 xxx
* change tact altogether in form_to_object() and assume there are no autoincrement fields in $form
+ * move the form/object seeding in create() to the core Controller create() method. This change
+ is as much to solve a strange Class::C3/Dispatcher issue with multiple inheritance as anything.
+
Modified: CatalystX-CRUD/CatalystX-CRUD-Controller-RHTMLO/trunk/lib/CatalystX/CRUD/Controller/RHTMLO.pm
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD-Controller-RHTMLO/trunk/lib/CatalystX/CRUD/Controller/RHTMLO.pm 2008-08-26 15:20:04 UTC (rev 8295)
+++ CatalystX-CRUD/CatalystX-CRUD-Controller-RHTMLO/trunk/lib/CatalystX/CRUD/Controller/RHTMLO.pm 2008-08-26 20:20:37 UTC (rev 8296)
@@ -28,31 +28,6 @@
=cut
-=head2 create
-
-Attribute: Local
-
-Overrides base create() to optionally pre-populate form
-with param-based values.
-
-=cut
-
-sub create : Local {
- my ( $self, $c ) = @_;
- $self->next::method($c);
-
- # allow for params to be passed in to seed the form/object
- for my $field ( $self->field_names($c) ) {
- if ( exists $c->req->params->{$field} ) {
- $c->stash->{form}
- ->field_value( $field, $c->req->params->{$field} );
- if ( $c->stash->{object}->can($field) ) {
- $c->stash->{object}->$field( $c->req->params->{$field} );
- }
- }
- }
-}
-
=head2 form( I<context> )
Returns an instance of config->{form_class}.
More information about the Catalyst-commits
mailing list