[Bast-commits] r8161 - in
branches/DBIx-Class-Schema-Loader/back-compat: .
lib/DBIx/Class/Schema/Loader lib/DBIx/Class/Schema/Loader/Compat
caelum at dev.catalyst.perl.org
caelum at dev.catalyst.perl.org
Thu Dec 24 06:49:55 GMT 2009
Author: caelum
Date: 2009-12-24 06:49:54 +0000 (Thu, 24 Dec 2009)
New Revision: 8161
Modified:
branches/DBIx-Class-Schema-Loader/back-compat/TODO-BACKCOMPAT
branches/DBIx-Class-Schema-Loader/back-compat/lib/DBIx/Class/Schema/Loader/Base.pm
branches/DBIx-Class-Schema-Loader/back-compat/lib/DBIx/Class/Schema/Loader/Compat/v0_040.pm
Log:
replacing ::Base with ::Compat now, instead of just unshifting to @ISA, t/backcompat/0.04006/20invocations.t now passes
Modified: branches/DBIx-Class-Schema-Loader/back-compat/TODO-BACKCOMPAT
===================================================================
--- branches/DBIx-Class-Schema-Loader/back-compat/TODO-BACKCOMPAT 2009-12-23 21:10:38 UTC (rev 8160)
+++ branches/DBIx-Class-Schema-Loader/back-compat/TODO-BACKCOMPAT 2009-12-24 06:49:54 UTC (rev 8161)
@@ -14,14 +14,10 @@
*** backcompat tests
These are still failing:
-* t/backcompat/0.04006/20invocations.t
* t/backcompat/0.04006/23dumpmore.t
-*** naming accessor
+Need a comprehensive backcompat.t
-* class data for Loader
-* passed to _loader->new
-
*** Write ::Manual::UpgradingFrom0.04006 POD
*** Catalyst Helper
Modified: branches/DBIx-Class-Schema-Loader/back-compat/lib/DBIx/Class/Schema/Loader/Base.pm
===================================================================
--- branches/DBIx-Class-Schema-Loader/back-compat/lib/DBIx/Class/Schema/Loader/Base.pm 2009-12-23 21:10:38 UTC (rev 8160)
+++ branches/DBIx-Class-Schema-Loader/back-compat/lib/DBIx/Class/Schema/Loader/Base.pm 2009-12-24 06:49:54 UTC (rev 8161)
@@ -343,8 +343,13 @@
no strict 'refs';
my $class = ref $self || $self;
require DBIx::Class::Schema::Loader::Compat::v0_040;
- unshift @{"${class}::ISA"},
- 'DBIx::Class::Schema::Loader::Compat::v0_040';
+
+ @{"${class}::ISA"} = map {
+ $_ eq 'DBIx::Class::Schema::Loader::Base' ?
+ 'DBIx::Class::Schema::Loader::Compat::v0_040' :
+ $_
+ } @{"${class}::ISA"};
+
Class::C3::reinitialize;
# just in case, though no one is likely to dump a dynamic schema
$self->schema_version_to_dump('0.04006');
@@ -367,7 +372,12 @@
if ($self->load_optional_class($compat_class)) {
no strict 'refs';
my $class = ref $self || $self;
- unshift @{"${class}::ISA"}, $compat_class;
+
+ @{"${class}::ISA"} = map {
+ $_ eq 'DBIx::Class::Schema::Loader::Base' ?
+ $compat_class : $_
+ } @{"${class}::ISA"};
+
Class::C3::reinitialize;
$self->schema_version_to_dump($real_ver);
last;
Modified: branches/DBIx-Class-Schema-Loader/back-compat/lib/DBIx/Class/Schema/Loader/Compat/v0_040.pm
===================================================================
--- branches/DBIx-Class-Schema-Loader/back-compat/lib/DBIx/Class/Schema/Loader/Compat/v0_040.pm 2009-12-23 21:10:38 UTC (rev 8160)
+++ branches/DBIx-Class-Schema-Loader/back-compat/lib/DBIx/Class/Schema/Loader/Compat/v0_040.pm 2009-12-24 06:49:54 UTC (rev 8161)
@@ -3,6 +3,9 @@
use strict;
use warnings;
use Class::C3;
+
+use base 'DBIx::Class::Schema::Loader::Base';
+
use DBIx::Class::Schema::Loader::RelBuilder::Compat::v0_040;
# Make a moniker from a table
More information about the Bast-commits
mailing list