[Catalyst-commits] r10155 - in trunk/Catalyst-Model-DBIC-Schema: .
t t/lib t/lib/TestAppC3Fail t/lib/TestAppC3Fail/Model
t/lib/TestAppC3Fail/Schema
t0m at dev.catalyst.perl.org
t0m at dev.catalyst.perl.org
Thu May 14 13:41:46 GMT 2009
Author: t0m
Date: 2009-05-14 13:41:46 +0000 (Thu, 14 May 2009)
New Revision: 10155
Added:
trunk/Catalyst-Model-DBIC-Schema/t/06c3_issues.t
trunk/Catalyst-Model-DBIC-Schema/t/lib/
trunk/Catalyst-Model-DBIC-Schema/t/lib/TestAppC3Fail.pm
trunk/Catalyst-Model-DBIC-Schema/t/lib/TestAppC3Fail/
trunk/Catalyst-Model-DBIC-Schema/t/lib/TestAppC3Fail/Model/
trunk/Catalyst-Model-DBIC-Schema/t/lib/TestAppC3Fail/Model/DB.pm
trunk/Catalyst-Model-DBIC-Schema/t/lib/TestAppC3Fail/Schema/
trunk/Catalyst-Model-DBIC-Schema/t/lib/TestAppC3Fail/Schema/DB.pm
Modified:
trunk/Catalyst-Model-DBIC-Schema/Changes
Log:
Add tests for my fail. Fixed already with the dependencies in Makefile.PL
Modified: trunk/Catalyst-Model-DBIC-Schema/Changes
===================================================================
--- trunk/Catalyst-Model-DBIC-Schema/Changes 2009-05-14 13:37:52 UTC (rev 10154)
+++ trunk/Catalyst-Model-DBIC-Schema/Changes 2009-05-14 13:41:46 UTC (rev 10155)
@@ -1,5 +1,8 @@
Revision history for Perl extension Catalyst::Model::DBIC::Schema
+ - Add tests for issues with Class::C3 which are caused to
+ applications which use new Catalyst but old DBIC, and have
+ use Class::C3 in the MyApp class (t0m)
- warn on empty schema
- create=dynamic deprecation warning
- conversion to Moose (of Model, helper to follow)
Added: trunk/Catalyst-Model-DBIC-Schema/t/06c3_issues.t
===================================================================
--- trunk/Catalyst-Model-DBIC-Schema/t/06c3_issues.t (rev 0)
+++ trunk/Catalyst-Model-DBIC-Schema/t/06c3_issues.t 2009-05-14 13:41:46 UTC (rev 10155)
@@ -0,0 +1,16 @@
+use strict;
+use warnings;
+
+use FindBin qw/$Bin/;
+use lib "$Bin/lib";
+
+use Test::More tests => 1;
+
+# This fails for me on 5.8.8 with the following module versions:
+#
+# Class:C3 0.21
+# Class::C3::Componentised 1.0005
+# DBIx::Class 0.08013 (0.08099_05 works)
+
+use TestAppC3Fail;
+
Added: trunk/Catalyst-Model-DBIC-Schema/t/lib/TestAppC3Fail/Model/DB.pm
===================================================================
--- trunk/Catalyst-Model-DBIC-Schema/t/lib/TestAppC3Fail/Model/DB.pm (rev 0)
+++ trunk/Catalyst-Model-DBIC-Schema/t/lib/TestAppC3Fail/Model/DB.pm 2009-05-14 13:41:46 UTC (rev 10155)
@@ -0,0 +1,11 @@
+package TestAppC3Fail::Model::DB;
+use strict;
+use warnings;
+use base 'Catalyst::Model::DBIC::Schema';
+
+__PACKAGE__->config(
+ schema_class => 'TestAppC3Fail::Schema::DB',
+ connect_info => [ 'DBI:SQLite:dbname=foo', '', '' ],
+);
+
+1;
Added: trunk/Catalyst-Model-DBIC-Schema/t/lib/TestAppC3Fail/Schema/DB.pm
===================================================================
--- trunk/Catalyst-Model-DBIC-Schema/t/lib/TestAppC3Fail/Schema/DB.pm (rev 0)
+++ trunk/Catalyst-Model-DBIC-Schema/t/lib/TestAppC3Fail/Schema/DB.pm 2009-05-14 13:41:46 UTC (rev 10155)
@@ -0,0 +1,11 @@
+package TestAppC3Fail::Schema::DB;
+
+use strict;
+use warnings;
+
+use base 'DBIx::Class::Schema';
+
+__PACKAGE__->load_classes;
+
+1;
+
Added: trunk/Catalyst-Model-DBIC-Schema/t/lib/TestAppC3Fail.pm
===================================================================
--- trunk/Catalyst-Model-DBIC-Schema/t/lib/TestAppC3Fail.pm (rev 0)
+++ trunk/Catalyst-Model-DBIC-Schema/t/lib/TestAppC3Fail.pm 2009-05-14 13:41:46 UTC (rev 10155)
@@ -0,0 +1,25 @@
+package TestAppC3Fail;
+use strict;
+use warnings;
+use Class::C3; # This causes the fail, saying use MRO::Compat is fine..
+
+our $VERSION = '0.0001';
+
+use Catalyst::Runtime '5.70';
+use Catalyst;
+
+__PACKAGE__->config(
+ name => 'TestAppC3Fail',
+);
+
+my @keys = sort keys( %{ __PACKAGE__->config } );
+
+__PACKAGE__->setup;
+
+my @new_keys = sort keys( %{ __PACKAGE__->config } );
+use Test::More;
+
+is_deeply(\@new_keys, \@keys, 'Config keys correct');
+
+1;
+
More information about the Catalyst-commits
mailing list