[Catalyst-commits] r8318 - in CatalystX-CRUD/CatalystX-CRUD/trunk:
. lib/CatalystX/CRUD
karpet at dev.catalyst.perl.org
karpet at dev.catalyst.perl.org
Fri Aug 29 19:18:14 BST 2008
Author: karpet
Date: 2008-08-29 19:18:14 +0100 (Fri, 29 Aug 2008)
New Revision: 8318
Modified:
CatalystX-CRUD/CatalystX-CRUD/trunk/Changes
CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/REST.pm
Log:
add new() in REST to call next::method. Works around (some) multiple inheritance issues.
Modified: CatalystX-CRUD/CatalystX-CRUD/trunk/Changes
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD/trunk/Changes 2008-08-29 18:02:39 UTC (rev 8317)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/Changes 2008-08-29 18:18:14 UTC (rev 8318)
@@ -152,5 +152,6 @@
* Model::Utils make_query() will uc() sort direction
* change behaviour of get_primary_key() in base Controller to not look in req->params for pk values.
This allows for changing the PK as part of an update.
+ * add new() in REST to call next::method. Works around (some) multiple inheritance issues.
Modified: CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/REST.pm
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/REST.pm 2008-08-29 18:02:39 UTC (rev 8317)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/REST.pm 2008-08-29 18:18:14 UTC (rev 8318)
@@ -7,6 +7,7 @@
use Data::Dump qw( dump );
__PACKAGE__->mk_accessors(qw( enable_rpc_compat ));
+__PACKAGE__->config( enable_rpc_compat => 0 );
our $VERSION = '0.30';
@@ -91,8 +92,6 @@
=cut
-__PACKAGE__->config( enable_rpc_compat => 0 );
-
sub create_form : Path('create_form') {
my ( $self, $c ) = @_;
$self->create($c);
@@ -396,6 +395,18 @@
1;
}
+=head2 new
+
+Overrides base method just to call next::method to ensure
+config() gets merged correctly.
+
+=cut
+
+sub new {
+ my ( $class, $app_class, $args ) = @_;
+ return $class->next::method( $app_class, $args );
+}
+
1;
__END__
More information about the Catalyst-commits
mailing list