[Bast-commits] r7977 - in
branches/DBIx-Class-Schema-Loader/back-compat:
lib/DBIx/Class/Schema/Loader t/backcompat/0.04006
t/backcompat/0.04006/lib
caelum at dev.catalyst.perl.org
caelum at dev.catalyst.perl.org
Sun Nov 29 01:56:06 GMT 2009
Author: caelum
Date: 2009-11-29 01:56:06 +0000 (Sun, 29 Nov 2009)
New Revision: 7977
Modified:
branches/DBIx-Class-Schema-Loader/back-compat/lib/DBIx/Class/Schema/Loader/Base.pm
branches/DBIx-Class-Schema-Loader/back-compat/t/backcompat/0.04006/10sqlite_common.t
branches/DBIx-Class-Schema-Loader/back-compat/t/backcompat/0.04006/11mysql_common.t
branches/DBIx-Class-Schema-Loader/back-compat/t/backcompat/0.04006/12pg_common.t
branches/DBIx-Class-Schema-Loader/back-compat/t/backcompat/0.04006/13db2_common.t
branches/DBIx-Class-Schema-Loader/back-compat/t/backcompat/0.04006/14ora_common.t
branches/DBIx-Class-Schema-Loader/back-compat/t/backcompat/0.04006/20invocations.t
branches/DBIx-Class-Schema-Loader/back-compat/t/backcompat/0.04006/21misc_fatal.t
branches/DBIx-Class-Schema-Loader/back-compat/t/backcompat/0.04006/22dump.t
branches/DBIx-Class-Schema-Loader/back-compat/t/backcompat/0.04006/23dumpmore.t
branches/DBIx-Class-Schema-Loader/back-compat/t/backcompat/0.04006/lib/dbixcsl_common_tests.pm
Log:
minor changes
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-11-28 15:57:04 UTC (rev 7976)
+++ branches/DBIx-Class-Schema-Loader/back-compat/lib/DBIx/Class/Schema/Loader/Base.pm 2009-11-29 01:56:06 UTC (rev 7977)
@@ -343,6 +343,8 @@
unshift @{"${class}::ISA"},
'DBIx::Class::Schema::Loader::Compat::v0_040';
Class::C3::reinitialize;
+# just in case, though no one is likely to dump a dynamic schema
+ $self->version_to_dump('0.04006');
return;
}
@@ -388,24 +390,33 @@
return;
}
-sub _load_external {
+sub _class_path {
my ($self, $class) = @_;
my $class_path = $class;
$class_path =~ s{::}{/}g;
$class_path .= '.pm';
- my $real_inc_path = $self->_find_file_in_inc($class_path);
+ return $class_path;
+}
+sub _find_class_in_inc {
+ my ($self, $class) = @_;
+
+ return $self->_find_file_in_inc($self->_class_path($class));
+}
+
+sub _load_external {
+ my ($self, $class) = @_;
+
+ my $real_inc_path = $self->_find_class_in_inc($class);
+
return if !$real_inc_path;
# If we make it to here, we loaded an external definition
warn qq/# Loaded external class definition for '$class'\n/
if $self->debug;
- croak 'Failed to locate actual external module file for '
- . "'$class'"
- if !$real_inc_path;
open(my $fh, '<', $real_inc_path)
or croak "Failed to open '$real_inc_path' for reading: $!";
$self->_ext_stmt($class,
Modified: branches/DBIx-Class-Schema-Loader/back-compat/t/backcompat/0.04006/10sqlite_common.t
===================================================================
--- branches/DBIx-Class-Schema-Loader/back-compat/t/backcompat/0.04006/10sqlite_common.t 2009-11-28 15:57:04 UTC (rev 7976)
+++ branches/DBIx-Class-Schema-Loader/back-compat/t/backcompat/0.04006/10sqlite_common.t 2009-11-29 01:56:06 UTC (rev 7977)
@@ -2,7 +2,7 @@
use lib qw(t/backcompat/0.04006/lib);
use dbixcsl_common_tests;
use Test::More;
-plan skip_all => 'Backcompat tests disabled'
+plan skip_all => 'set SCHEMA_LOADER_TESTS_BACKCOMPAT to enable these tests'
unless $ENV{SCHEMA_LOADER_TESTS_BACKCOMPAT};
eval { require DBD::SQLite };
Modified: branches/DBIx-Class-Schema-Loader/back-compat/t/backcompat/0.04006/11mysql_common.t
===================================================================
--- branches/DBIx-Class-Schema-Loader/back-compat/t/backcompat/0.04006/11mysql_common.t 2009-11-28 15:57:04 UTC (rev 7976)
+++ branches/DBIx-Class-Schema-Loader/back-compat/t/backcompat/0.04006/11mysql_common.t 2009-11-29 01:56:06 UTC (rev 7977)
@@ -2,7 +2,7 @@
use lib qw(t/backcompat/0.04006/lib);
use dbixcsl_common_tests;
use Test::More;
-plan skip_all => 'Backcompat tests disabled'
+plan skip_all => 'set SCHEMA_LOADER_TESTS_BACKCOMPAT to enable these tests'
unless $ENV{SCHEMA_LOADER_TESTS_BACKCOMPAT};
Modified: branches/DBIx-Class-Schema-Loader/back-compat/t/backcompat/0.04006/12pg_common.t
===================================================================
--- branches/DBIx-Class-Schema-Loader/back-compat/t/backcompat/0.04006/12pg_common.t 2009-11-28 15:57:04 UTC (rev 7976)
+++ branches/DBIx-Class-Schema-Loader/back-compat/t/backcompat/0.04006/12pg_common.t 2009-11-29 01:56:06 UTC (rev 7977)
@@ -2,7 +2,7 @@
use lib qw(t/backcompat/0.04006/lib);
use dbixcsl_common_tests;
use Test::More;
-plan skip_all => 'Backcompat tests disabled'
+plan skip_all => 'set SCHEMA_LOADER_TESTS_BACKCOMPAT to enable these tests'
unless $ENV{SCHEMA_LOADER_TESTS_BACKCOMPAT};
Modified: branches/DBIx-Class-Schema-Loader/back-compat/t/backcompat/0.04006/13db2_common.t
===================================================================
--- branches/DBIx-Class-Schema-Loader/back-compat/t/backcompat/0.04006/13db2_common.t 2009-11-28 15:57:04 UTC (rev 7976)
+++ branches/DBIx-Class-Schema-Loader/back-compat/t/backcompat/0.04006/13db2_common.t 2009-11-29 01:56:06 UTC (rev 7977)
@@ -2,7 +2,7 @@
use lib qw(t/backcompat/0.04006/lib);
use dbixcsl_common_tests;
use Test::More;
-plan skip_all => 'Backcompat tests disabled'
+plan skip_all => 'set SCHEMA_LOADER_TESTS_BACKCOMPAT to enable these tests'
unless $ENV{SCHEMA_LOADER_TESTS_BACKCOMPAT};
Modified: branches/DBIx-Class-Schema-Loader/back-compat/t/backcompat/0.04006/14ora_common.t
===================================================================
--- branches/DBIx-Class-Schema-Loader/back-compat/t/backcompat/0.04006/14ora_common.t 2009-11-28 15:57:04 UTC (rev 7976)
+++ branches/DBIx-Class-Schema-Loader/back-compat/t/backcompat/0.04006/14ora_common.t 2009-11-29 01:56:06 UTC (rev 7977)
@@ -2,7 +2,7 @@
use lib qw(t/backcompat/0.04006/lib);
use dbixcsl_common_tests;
use Test::More;
-plan skip_all => 'Backcompat tests disabled'
+plan skip_all => 'set SCHEMA_LOADER_TESTS_BACKCOMPAT to enable these tests'
unless $ENV{SCHEMA_LOADER_TESTS_BACKCOMPAT};
Modified: branches/DBIx-Class-Schema-Loader/back-compat/t/backcompat/0.04006/20invocations.t
===================================================================
--- branches/DBIx-Class-Schema-Loader/back-compat/t/backcompat/0.04006/20invocations.t 2009-11-28 15:57:04 UTC (rev 7976)
+++ branches/DBIx-Class-Schema-Loader/back-compat/t/backcompat/0.04006/20invocations.t 2009-11-29 01:56:06 UTC (rev 7977)
@@ -3,7 +3,7 @@
use lib qw(t/backcompat/0.04006/lib);
use make_dbictest_db;
use Test::More;
-plan skip_all => 'Backcompat tests disabled'
+plan skip_all => 'set SCHEMA_LOADER_TESTS_BACKCOMPAT to enable these tests'
unless $ENV{SCHEMA_LOADER_TESTS_BACKCOMPAT};
Modified: branches/DBIx-Class-Schema-Loader/back-compat/t/backcompat/0.04006/21misc_fatal.t
===================================================================
--- branches/DBIx-Class-Schema-Loader/back-compat/t/backcompat/0.04006/21misc_fatal.t 2009-11-28 15:57:04 UTC (rev 7976)
+++ branches/DBIx-Class-Schema-Loader/back-compat/t/backcompat/0.04006/21misc_fatal.t 2009-11-29 01:56:06 UTC (rev 7977)
@@ -3,7 +3,7 @@
use lib qw(t/backcompat/0.04006/lib);
use make_dbictest_db;
use Test::More;
-plan skip_all => 'Backcompat tests disabled'
+plan skip_all => 'set SCHEMA_LOADER_TESTS_BACKCOMPAT to enable these tests'
unless $ENV{SCHEMA_LOADER_TESTS_BACKCOMPAT};
Modified: branches/DBIx-Class-Schema-Loader/back-compat/t/backcompat/0.04006/22dump.t
===================================================================
--- branches/DBIx-Class-Schema-Loader/back-compat/t/backcompat/0.04006/22dump.t 2009-11-28 15:57:04 UTC (rev 7976)
+++ branches/DBIx-Class-Schema-Loader/back-compat/t/backcompat/0.04006/22dump.t 2009-11-29 01:56:06 UTC (rev 7977)
@@ -4,7 +4,7 @@
use File::Path;
use make_dbictest_db;
use Test::More;
-plan skip_all => 'Backcompat tests disabled'
+plan skip_all => 'set SCHEMA_LOADER_TESTS_BACKCOMPAT to enable these tests'
unless $ENV{SCHEMA_LOADER_TESTS_BACKCOMPAT};
Modified: branches/DBIx-Class-Schema-Loader/back-compat/t/backcompat/0.04006/23dumpmore.t
===================================================================
--- branches/DBIx-Class-Schema-Loader/back-compat/t/backcompat/0.04006/23dumpmore.t 2009-11-28 15:57:04 UTC (rev 7976)
+++ branches/DBIx-Class-Schema-Loader/back-compat/t/backcompat/0.04006/23dumpmore.t 2009-11-29 01:56:06 UTC (rev 7977)
@@ -5,7 +5,7 @@
use make_dbictest_db;
require DBIx::Class::Schema::Loader;
use Test::More;
-plan skip_all => 'Backcompat tests disabled'
+plan skip_all => 'set SCHEMA_LOADER_TESTS_BACKCOMPAT to enable these tests'
unless $ENV{SCHEMA_LOADER_TESTS_BACKCOMPAT};
Modified: branches/DBIx-Class-Schema-Loader/back-compat/t/backcompat/0.04006/lib/dbixcsl_common_tests.pm
===================================================================
--- branches/DBIx-Class-Schema-Loader/back-compat/t/backcompat/0.04006/lib/dbixcsl_common_tests.pm 2009-11-28 15:57:04 UTC (rev 7976)
+++ branches/DBIx-Class-Schema-Loader/back-compat/t/backcompat/0.04006/lib/dbixcsl_common_tests.pm 2009-11-29 01:56:06 UTC (rev 7977)
@@ -113,6 +113,13 @@
$classes->{$table_name} = $schema_class . q{::} . $source_name;
}
+# for debugging...
+# {
+# mkdir '/tmp/HLAGH';
+# $conn->_loader->{dump_directory} = '/tmp/HLAGH';
+# $conn->_loader->_dump_to_dir(values %$classes);
+# }
+
my $moniker1 = $monikers->{loader_test1};
my $class1 = $classes->{loader_test1};
my $rsobj1 = $conn->resultset($moniker1);
More information about the Bast-commits
mailing list