[Catalyst-commits] r9952 - in
CatalystX-CRUD/CatalystX-CRUD-Model-RDBO/trunk: .
lib/CatalystX/CRUD/Model t t/lib t/lib/MyApp t/lib/MyApp/Base
t/lib/MyApp/Model
karpet at dev.catalyst.perl.org
karpet at dev.catalyst.perl.org
Thu Apr 30 03:32:30 GMT 2009
Author: karpet
Date: 2009-04-30 04:32:29 +0100 (Thu, 30 Apr 2009)
New Revision: 9952
Added:
CatalystX-CRUD/CatalystX-CRUD-Model-RDBO/trunk/t/lib/MyApp/Base/
CatalystX-CRUD/CatalystX-CRUD-Model-RDBO/trunk/t/lib/MyApp/Base/RDBO.pm
Modified:
CatalystX-CRUD/CatalystX-CRUD-Model-RDBO/trunk/Changes
CatalystX-CRUD/CatalystX-CRUD-Model-RDBO/trunk/Makefile.PL
CatalystX-CRUD/CatalystX-CRUD-Model-RDBO/trunk/lib/CatalystX/CRUD/Model/RDBO.pm
CatalystX-CRUD/CatalystX-CRUD-Model-RDBO/trunk/t/01-rdbo.t
CatalystX-CRUD/CatalystX-CRUD-Model-RDBO/trunk/t/lib/MyApp.pm
CatalystX-CRUD/CatalystX-CRUD-Model-RDBO/trunk/t/lib/MyApp/Model/Bar.pm
CatalystX-CRUD/CatalystX-CRUD-Model-RDBO/trunk/t/lib/MyApp/Model/Foo.pm
Log:
use MRO::Compat and support CXC 0.43
Modified: CatalystX-CRUD/CatalystX-CRUD-Model-RDBO/trunk/Changes
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD-Model-RDBO/trunk/Changes 2009-04-30 03:30:37 UTC (rev 9951)
+++ CatalystX-CRUD/CatalystX-CRUD-Model-RDBO/trunk/Changes 2009-04-30 03:32:29 UTC (rev 9952)
@@ -71,4 +71,5 @@
0.20 xxx
* switch to MRO::Compat from Class::C3
+ * fixes for CatalystX::CRUD 0.43
Modified: CatalystX-CRUD/CatalystX-CRUD-Model-RDBO/trunk/Makefile.PL
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD-Model-RDBO/trunk/Makefile.PL 2009-04-30 03:30:37 UTC (rev 9951)
+++ CatalystX-CRUD/CatalystX-CRUD-Model-RDBO/trunk/Makefile.PL 2009-04-30 03:32:29 UTC (rev 9952)
@@ -13,8 +13,8 @@
'Data::Dump' => 0, # for testing
'Rose::DB::Object' => 0,
'Rose::DBx::Object::MoreHelpers' => 0,
- 'CatalystX::CRUD' => 0.29,
- 'Catalyst::Runtime' => 0,
+ 'CatalystX::CRUD' => 0.43,
+ 'Catalyst::Runtime' => 5.8,
'Rose::DBx::TestDB' => 0,
},
Modified: CatalystX-CRUD/CatalystX-CRUD-Model-RDBO/trunk/lib/CatalystX/CRUD/Model/RDBO.pm
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD-Model-RDBO/trunk/lib/CatalystX/CRUD/Model/RDBO.pm 2009-04-30 03:30:37 UTC (rev 9951)
+++ CatalystX-CRUD/CatalystX-CRUD-Model-RDBO/trunk/lib/CatalystX/CRUD/Model/RDBO.pm 2009-04-30 03:32:29 UTC (rev 9952)
@@ -393,7 +393,7 @@
sub has_relationship {
my ( $self, $obj, $rel_name ) = @_;
- return $obj->meta->relationship($rel_name);
+ return $obj->delegate->meta->relationship($rel_name);
}
sub add_related {
@@ -413,7 +413,7 @@
my $meta = $self->_get_rel_meta( $obj, $rel_name );
my $obj_method
- = $obj->meta->column_accessor_method_name( $meta->{map_from}->[1] );
+ = $obj->delegate->meta->column_accessor_method_name( $meta->{map_from}->[1] );
my $query = [
$meta->{map_from}->[0] => $obj->$obj_method,
$meta->{map_to}->[0] => $fk_val,
Modified: CatalystX-CRUD/CatalystX-CRUD-Model-RDBO/trunk/t/01-rdbo.t
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD-Model-RDBO/trunk/t/01-rdbo.t 2009-04-30 03:30:37 UTC (rev 9951)
+++ CatalystX-CRUD/CatalystX-CRUD-Model-RDBO/trunk/t/01-rdbo.t 2009-04-30 03:32:29 UTC (rev 9952)
@@ -13,6 +13,8 @@
use Data::Dump qw( dump );
use HTTP::Request::Common;
+diag("testing against Catalyst-Runtime version " . $Catalyst::Runtime::VERSION);
+
ok( my $res = request('/foo/test'), "get /foo/test" );
#dump $res->headers;
Added: CatalystX-CRUD/CatalystX-CRUD-Model-RDBO/trunk/t/lib/MyApp/Base/RDBO.pm
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD-Model-RDBO/trunk/t/lib/MyApp/Base/RDBO.pm (rev 0)
+++ CatalystX-CRUD/CatalystX-CRUD-Model-RDBO/trunk/t/lib/MyApp/Base/RDBO.pm 2009-04-30 03:32:29 UTC (rev 9952)
@@ -0,0 +1,6 @@
+package MyApp::Base::RDBO;
+use strict;
+use base qw( CatalystX::CRUD::Model::RDBO );
+
+1;
+
Modified: CatalystX-CRUD/CatalystX-CRUD-Model-RDBO/trunk/t/lib/MyApp/Model/Bar.pm
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD-Model-RDBO/trunk/t/lib/MyApp/Model/Bar.pm 2009-04-30 03:30:37 UTC (rev 9951)
+++ CatalystX-CRUD/CatalystX-CRUD-Model-RDBO/trunk/t/lib/MyApp/Model/Bar.pm 2009-04-30 03:32:29 UTC (rev 9952)
@@ -1,6 +1,10 @@
package MyApp::Model::Bar;
-use base qw( CatalystX::CRUD::Model::RDBO );
-__PACKAGE__->config->{object_class} = 'MyApp::Object';
-__PACKAGE__->config->{name} = 'My::Bar';
+use base qw( MyApp::Base::RDBO );
+__PACKAGE__->config(
+ object_class => 'MyApp::Object',
+ name => 'My::Bar',
+);
+use MRO::Compat;
+use mro 'c3';
1;
Modified: CatalystX-CRUD/CatalystX-CRUD-Model-RDBO/trunk/t/lib/MyApp/Model/Foo.pm
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD-Model-RDBO/trunk/t/lib/MyApp/Model/Foo.pm 2009-04-30 03:30:37 UTC (rev 9951)
+++ CatalystX-CRUD/CatalystX-CRUD-Model-RDBO/trunk/t/lib/MyApp/Model/Foo.pm 2009-04-30 03:32:29 UTC (rev 9952)
@@ -1,9 +1,11 @@
package MyApp::Model::Foo;
-use base qw( CatalystX::CRUD::Model::RDBO );
+use base qw( MyApp::Base::RDBO );
__PACKAGE__->config(
object_class => 'MyApp::Object',
name => My::Foo,
load_with => [qw( bar bars )]
);
+use MRO::Compat;
+use mro 'c3';
1;
Modified: CatalystX-CRUD/CatalystX-CRUD-Model-RDBO/trunk/t/lib/MyApp.pm
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD-Model-RDBO/trunk/t/lib/MyApp.pm 2009-04-30 03:30:37 UTC (rev 9951)
+++ CatalystX-CRUD/CatalystX-CRUD-Model-RDBO/trunk/t/lib/MyApp.pm 2009-04-30 03:32:29 UTC (rev 9952)
@@ -2,9 +2,21 @@
use Catalyst::Runtime '5.70';
use Catalyst;
use Carp;
+use Data::Dump qw( dump );
our $VERSION = '0.01';
+__PACKAGE__->config( foo => 'bar' );
+__PACKAGE__->config->{bad} = 'juju';
+
__PACKAGE__->setup();
+#warn dump MyApp->config;
+
+use MRO::Compat;
+use mro 'c3';
+Class::C3::initialize(); # for REST
+
+#warn dump MyApp->config;
+
1;
More information about the Catalyst-commits
mailing list