From: Peter Rabbitson Date: Wed, 1 Sep 2010 07:10:12 +0000 (+0200) Subject: Use MRO::Compat instead of forcing Class::C3 X-Git-Tag: 0.07002~22 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=942bd5e02cb04afd992bb66c048de6f797c2568a;p=dbsrgits%2FDBIx-Class-Schema-Loader.git Use MRO::Compat instead of forcing Class::C3 --- diff --git a/Changes b/Changes index 409bee1..1c02978 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,7 @@ Revision history for Perl extension DBIx::Class::Schema::Loader + - Switch to MRO::Compat + 0.07001 2010-07-24 21:28:08 - put is_deferrable => 1 back into default attributes for belongs_to - fix Postgres sequence detection for qualified sequences diff --git a/Makefile.PL b/Makefile.PL index 10c2834..3b80337 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -28,7 +28,7 @@ requires 'Lingua::EN::Inflect::Phrase' => '0.02'; requires 'Text::Balanced' => 0; requires 'Digest::MD5' => '2.36'; requires 'Class::Accessor::Grouped' => '0.09002'; -requires 'Class::C3' => '0.18'; +requires 'MRO::Compat' => '0.09'; requires 'Class::C3::Componentised' => '1.0005'; requires 'Carp::Clan' => 0; requires 'Class::Inspector' => 0; diff --git a/lib/DBIx/Class/Schema/Loader.pm b/lib/DBIx/Class/Schema/Loader.pm index 54126ac..5ce5e12 100644 --- a/lib/DBIx/Class/Schema/Loader.pm +++ b/lib/DBIx/Class/Schema/Loader.pm @@ -4,7 +4,7 @@ use strict; use warnings; use base qw/DBIx::Class::Schema Class::Accessor::Grouped/; use Carp::Clan qw/^DBIx::Class/; -use Class::C3; +use mro 'c3'; use Scalar::Util qw/ weaken /; # Always remember to do all digits for the version even if they're 0 diff --git a/lib/DBIx/Class/Schema/Loader/Base.pm b/lib/DBIx/Class/Schema/Loader/Base.pm index d469f6c..ecd0ca7 100644 --- a/lib/DBIx/Class/Schema/Loader/Base.pm +++ b/lib/DBIx/Class/Schema/Loader/Base.pm @@ -3,7 +3,7 @@ package DBIx::Class::Schema::Loader::Base; use strict; use warnings; use base qw/Class::Accessor::Grouped Class::C3::Componentised/; -use Class::C3; +use mro 'c3'; use Carp::Clan qw/^DBIx::Class/; use DBIx::Class::Schema::Loader::RelBuilder; use Data::Dump qw/ dump /; @@ -1081,7 +1081,7 @@ sub _reload_classes { { no warnings 'redefine'; - local *Class::C3::reinitialize = sub {}; + local *Class::C3::reinitialize = sub {}; # to speed things up, reinitialized below use warnings; if ($class->can('meta') && try { $class->meta->isa('Moose::Meta::Class') }) { diff --git a/lib/DBIx/Class/Schema/Loader/DBI.pm b/lib/DBIx/Class/Schema/Loader/DBI.pm index a1451eb..19d20fa 100644 --- a/lib/DBIx/Class/Schema/Loader/DBI.pm +++ b/lib/DBIx/Class/Schema/Loader/DBI.pm @@ -3,7 +3,7 @@ package DBIx::Class::Schema::Loader::DBI; use strict; use warnings; use base qw/DBIx::Class::Schema::Loader::Base/; -use Class::C3; +use mro 'c3'; use Carp::Clan qw/^DBIx::Class/; our $VERSION = '0.07001'; diff --git a/lib/DBIx/Class/Schema/Loader/DBI/Component/QuotedDefault.pm b/lib/DBIx/Class/Schema/Loader/DBI/Component/QuotedDefault.pm index 5dd5884..3fec4f7 100644 --- a/lib/DBIx/Class/Schema/Loader/DBI/Component/QuotedDefault.pm +++ b/lib/DBIx/Class/Schema/Loader/DBI/Component/QuotedDefault.pm @@ -2,7 +2,7 @@ package DBIx::Class::Schema::Loader::DBI::Component::QuotedDefault; use strict; use warnings; -use Class::C3; +use mro 'c3'; our $VERSION = '0.07001'; diff --git a/lib/DBIx/Class/Schema/Loader/DBI/DB2.pm b/lib/DBIx/Class/Schema/Loader/DBI/DB2.pm index d0cc796..5d9ae4a 100644 --- a/lib/DBIx/Class/Schema/Loader/DBI/DB2.pm +++ b/lib/DBIx/Class/Schema/Loader/DBI/DB2.pm @@ -7,7 +7,7 @@ use base qw/ DBIx::Class::Schema::Loader::DBI /; use Carp::Clan qw/^DBIx::Class/; -use Class::C3; +use mro 'c3'; our $VERSION = '0.07001'; diff --git a/lib/DBIx/Class/Schema/Loader/DBI/Informix.pm b/lib/DBIx/Class/Schema/Loader/DBI/Informix.pm index 85fa056..5459c2f 100644 --- a/lib/DBIx/Class/Schema/Loader/DBI/Informix.pm +++ b/lib/DBIx/Class/Schema/Loader/DBI/Informix.pm @@ -2,7 +2,7 @@ package DBIx::Class::Schema::Loader::DBI::Informix; use strict; use warnings; -use Class::C3; +use mro 'c3'; use base qw/DBIx::Class::Schema::Loader::DBI/; use Carp::Clan qw/^DBIx::Class/; use Scalar::Util 'looks_like_number'; diff --git a/lib/DBIx/Class/Schema/Loader/DBI/InterBase.pm b/lib/DBIx/Class/Schema/Loader/DBI/InterBase.pm index 6f73395..48e1e7b 100644 --- a/lib/DBIx/Class/Schema/Loader/DBI/InterBase.pm +++ b/lib/DBIx/Class/Schema/Loader/DBI/InterBase.pm @@ -2,7 +2,7 @@ package DBIx::Class::Schema::Loader::DBI::InterBase; use strict; use warnings; -use Class::C3; +use mro 'c3'; use base qw/DBIx::Class::Schema::Loader::DBI/; use Carp::Clan qw/^DBIx::Class/; use List::Util 'first'; diff --git a/lib/DBIx/Class/Schema/Loader/DBI/MSSQL.pm b/lib/DBIx/Class/Schema/Loader/DBI/MSSQL.pm index a2cc916..e9d628c 100644 --- a/lib/DBIx/Class/Schema/Loader/DBI/MSSQL.pm +++ b/lib/DBIx/Class/Schema/Loader/DBI/MSSQL.pm @@ -4,7 +4,7 @@ use strict; use warnings; use base 'DBIx::Class::Schema::Loader::DBI::Sybase::Common'; use Carp::Clan qw/^DBIx::Class/; -use Class::C3; +use mro 'c3'; our $VERSION = '0.07001'; diff --git a/lib/DBIx/Class/Schema/Loader/DBI/ODBC.pm b/lib/DBIx/Class/Schema/Loader/DBI/ODBC.pm index d9dd296..21f7189 100644 --- a/lib/DBIx/Class/Schema/Loader/DBI/ODBC.pm +++ b/lib/DBIx/Class/Schema/Loader/DBI/ODBC.pm @@ -4,7 +4,7 @@ use strict; use warnings; use base 'DBIx::Class::Schema::Loader::DBI'; use Carp::Clan qw/^DBIx::Class/; -use Class::C3; +use mro 'c3'; our $VERSION = '0.07001'; diff --git a/lib/DBIx/Class/Schema/Loader/DBI/ODBC/Firebird.pm b/lib/DBIx/Class/Schema/Loader/DBI/ODBC/Firebird.pm index aeed566..99f54bc 100644 --- a/lib/DBIx/Class/Schema/Loader/DBI/ODBC/Firebird.pm +++ b/lib/DBIx/Class/Schema/Loader/DBI/ODBC/Firebird.pm @@ -7,7 +7,7 @@ use base qw/ DBIx::Class::Schema::Loader::DBI::InterBase /; use Carp::Clan qw/^DBIx::Class/; -use Class::C3; +use mro 'c3'; our $VERSION = '0.07001'; diff --git a/lib/DBIx/Class/Schema/Loader/DBI/ODBC/Microsoft_SQL_Server.pm b/lib/DBIx/Class/Schema/Loader/DBI/ODBC/Microsoft_SQL_Server.pm index f5431d3..9c9ada0 100644 --- a/lib/DBIx/Class/Schema/Loader/DBI/ODBC/Microsoft_SQL_Server.pm +++ b/lib/DBIx/Class/Schema/Loader/DBI/ODBC/Microsoft_SQL_Server.pm @@ -6,7 +6,7 @@ use base qw/ DBIx::Class::Schema::Loader::DBI::MSSQL /; use Carp::Clan qw/^DBIx::Class/; -use Class::C3; +use mro 'c3'; our $VERSION = '0.07001'; diff --git a/lib/DBIx/Class/Schema/Loader/DBI/ODBC/SQL_Anywhere.pm b/lib/DBIx/Class/Schema/Loader/DBI/ODBC/SQL_Anywhere.pm index 74b7b69..5257718 100644 --- a/lib/DBIx/Class/Schema/Loader/DBI/ODBC/SQL_Anywhere.pm +++ b/lib/DBIx/Class/Schema/Loader/DBI/ODBC/SQL_Anywhere.pm @@ -6,7 +6,7 @@ use base qw/ DBIx::Class::Schema::Loader::DBI::SQLAnywhere /; use Carp::Clan qw/^DBIx::Class/; -use Class::C3; +use mro 'c3'; our $VERSION = '0.07001'; diff --git a/lib/DBIx/Class/Schema/Loader/DBI/Oracle.pm b/lib/DBIx/Class/Schema/Loader/DBI/Oracle.pm index c561894..354963a 100644 --- a/lib/DBIx/Class/Schema/Loader/DBI/Oracle.pm +++ b/lib/DBIx/Class/Schema/Loader/DBI/Oracle.pm @@ -7,7 +7,7 @@ use base qw/ DBIx::Class::Schema::Loader::DBI /; use Carp::Clan qw/^DBIx::Class/; -use Class::C3; +use mro 'c3'; our $VERSION = '0.07001'; diff --git a/lib/DBIx/Class/Schema/Loader/DBI/Pg.pm b/lib/DBIx/Class/Schema/Loader/DBI/Pg.pm index b218532..93cf18f 100644 --- a/lib/DBIx/Class/Schema/Loader/DBI/Pg.pm +++ b/lib/DBIx/Class/Schema/Loader/DBI/Pg.pm @@ -7,7 +7,7 @@ use base qw/ DBIx::Class::Schema::Loader::DBI /; use Carp::Clan qw/^DBIx::Class/; -use Class::C3; +use mro 'c3'; our $VERSION = '0.07001'; diff --git a/lib/DBIx/Class/Schema/Loader/DBI/SQLAnywhere.pm b/lib/DBIx/Class/Schema/Loader/DBI/SQLAnywhere.pm index 46472db..5db589c 100644 --- a/lib/DBIx/Class/Schema/Loader/DBI/SQLAnywhere.pm +++ b/lib/DBIx/Class/Schema/Loader/DBI/SQLAnywhere.pm @@ -2,7 +2,7 @@ package DBIx::Class::Schema::Loader::DBI::SQLAnywhere; use strict; use warnings; -use Class::C3; +use mro 'c3'; use base qw/ DBIx::Class::Schema::Loader::DBI::Component::QuotedDefault DBIx::Class::Schema::Loader::DBI diff --git a/lib/DBIx/Class/Schema/Loader/DBI/SQLite.pm b/lib/DBIx/Class/Schema/Loader/DBI/SQLite.pm index c5af130..70b267e 100644 --- a/lib/DBIx/Class/Schema/Loader/DBI/SQLite.pm +++ b/lib/DBIx/Class/Schema/Loader/DBI/SQLite.pm @@ -8,7 +8,7 @@ use base qw/ /; use Carp::Clan qw/^DBIx::Class/; use Text::Balanced qw( extract_bracketed ); -use Class::C3; +use mro 'c3'; our $VERSION = '0.07001'; diff --git a/lib/DBIx/Class/Schema/Loader/DBI/Sybase.pm b/lib/DBIx/Class/Schema/Loader/DBI/Sybase.pm index 2b9fc33..7a066be 100644 --- a/lib/DBIx/Class/Schema/Loader/DBI/Sybase.pm +++ b/lib/DBIx/Class/Schema/Loader/DBI/Sybase.pm @@ -4,7 +4,7 @@ use strict; use warnings; use base 'DBIx::Class::Schema::Loader::DBI::Sybase::Common'; use Carp::Clan qw/^DBIx::Class/; -use Class::C3; +use mro 'c3'; our $VERSION = '0.07001'; diff --git a/lib/DBIx/Class/Schema/Loader/DBI/Sybase/Common.pm b/lib/DBIx/Class/Schema/Loader/DBI/Sybase/Common.pm index 316d46a..609d9cb 100644 --- a/lib/DBIx/Class/Schema/Loader/DBI/Sybase/Common.pm +++ b/lib/DBIx/Class/Schema/Loader/DBI/Sybase/Common.pm @@ -4,7 +4,7 @@ use strict; use warnings; use base 'DBIx::Class::Schema::Loader::DBI'; use Carp::Clan qw/^DBIx::Class/; -use Class::C3; +use mro 'c3'; our $VERSION = '0.07001'; diff --git a/lib/DBIx/Class/Schema/Loader/DBI/Sybase/Microsoft_SQL_Server.pm b/lib/DBIx/Class/Schema/Loader/DBI/Sybase/Microsoft_SQL_Server.pm index 5c476de..ee51f6b 100644 --- a/lib/DBIx/Class/Schema/Loader/DBI/Sybase/Microsoft_SQL_Server.pm +++ b/lib/DBIx/Class/Schema/Loader/DBI/Sybase/Microsoft_SQL_Server.pm @@ -4,7 +4,7 @@ use strict; use warnings; use base 'DBIx::Class::Schema::Loader::DBI::MSSQL'; use Carp::Clan qw/^DBIx::Class/; -use Class::C3; +use mro 'c3'; our $VERSION = '0.07001'; diff --git a/lib/DBIx/Class/Schema/Loader/DBI/Writing.pm b/lib/DBIx/Class/Schema/Loader/DBI/Writing.pm index 9bb7a47..50a716c 100644 --- a/lib/DBIx/Class/Schema/Loader/DBI/Writing.pm +++ b/lib/DBIx/Class/Schema/Loader/DBI/Writing.pm @@ -19,7 +19,7 @@ DBIx::Class::Schema::Loader::DBI::Writing - Loader subclass writing guide for DB use warnings; use base 'DBIx::Class::Schema::Loader::DBI'; use Carp::Clan qw/^DBIx::Class/; - use Class::C3; + use mro 'c3'; sub _table_uniq_info { my ($self, $table) = @_; diff --git a/lib/DBIx/Class/Schema/Loader/DBI/mysql.pm b/lib/DBIx/Class/Schema/Loader/DBI/mysql.pm index d7a331a..3524cea 100644 --- a/lib/DBIx/Class/Schema/Loader/DBI/mysql.pm +++ b/lib/DBIx/Class/Schema/Loader/DBI/mysql.pm @@ -4,7 +4,7 @@ use strict; use warnings; use base 'DBIx::Class::Schema::Loader::DBI'; use Carp::Clan qw/^DBIx::Class/; -use Class::C3; +use mro 'c3'; our $VERSION = '0.07001'; diff --git a/lib/DBIx/Class/Schema/Loader/RelBuilder.pm b/lib/DBIx/Class/Schema/Loader/RelBuilder.pm index be0f136..650e043 100644 --- a/lib/DBIx/Class/Schema/Loader/RelBuilder.pm +++ b/lib/DBIx/Class/Schema/Loader/RelBuilder.pm @@ -2,7 +2,7 @@ package DBIx::Class::Schema::Loader::RelBuilder; use strict; use warnings; -use Class::C3; +use mro 'c3'; use Carp::Clan qw/^DBIx::Class/; use Scalar::Util (); diff --git a/lib/DBIx/Class/Schema/Loader/RelBuilder/Compat/v0_040.pm b/lib/DBIx/Class/Schema/Loader/RelBuilder/Compat/v0_040.pm index b78a89b..1f683a3 100644 --- a/lib/DBIx/Class/Schema/Loader/RelBuilder/Compat/v0_040.pm +++ b/lib/DBIx/Class/Schema/Loader/RelBuilder/Compat/v0_040.pm @@ -2,7 +2,7 @@ package DBIx::Class::Schema::Loader::RelBuilder::Compat::v0_040; use strict; use warnings; -use Class::C3; +use mro 'c3'; use base 'DBIx::Class::Schema::Loader::RelBuilder::Compat::v0_05'; use Carp::Clan qw/^DBIx::Class/; use Lingua::EN::Inflect::Number (); diff --git a/lib/DBIx/Class/Schema/Loader/RelBuilder/Compat/v0_05.pm b/lib/DBIx/Class/Schema/Loader/RelBuilder/Compat/v0_05.pm index f7985b4..0d3ed0f 100644 --- a/lib/DBIx/Class/Schema/Loader/RelBuilder/Compat/v0_05.pm +++ b/lib/DBIx/Class/Schema/Loader/RelBuilder/Compat/v0_05.pm @@ -2,7 +2,7 @@ package DBIx::Class::Schema::Loader::RelBuilder::Compat::v0_05; use strict; use warnings; -use Class::C3; +use mro 'c3'; use base 'DBIx::Class::Schema::Loader::RelBuilder::Compat::v0_06'; use Carp::Clan qw/^DBIx::Class/; use Lingua::EN::Inflect::Number (); diff --git a/lib/DBIx/Class/Schema/Loader/RelBuilder/Compat/v0_06.pm b/lib/DBIx/Class/Schema/Loader/RelBuilder/Compat/v0_06.pm index d0bfb78..e89e8c6 100644 --- a/lib/DBIx/Class/Schema/Loader/RelBuilder/Compat/v0_06.pm +++ b/lib/DBIx/Class/Schema/Loader/RelBuilder/Compat/v0_06.pm @@ -2,7 +2,7 @@ package DBIx::Class::Schema::Loader::RelBuilder::Compat::v0_06; use strict; use warnings; -use Class::C3; +use mro 'c3'; use base 'DBIx::Class::Schema::Loader::RelBuilder'; use Carp::Clan qw/^DBIx::Class/; use Lingua::EN::Inflect::Phrase ();