[Bast-commits] r7990 - in
branches/DBIx-Class-Schema-Loader/back-compat:
lib/DBIx/Class/Schema/Loader t/lib
caelum at dev.catalyst.perl.org
caelum at dev.catalyst.perl.org
Mon Nov 30 00:18:51 GMT 2009
Author: caelum
Date: 2009-11-30 00:18:50 +0000 (Mon, 30 Nov 2009)
New Revision: 7990
Modified:
branches/DBIx-Class-Schema-Loader/back-compat/lib/DBIx/Class/Schema/Loader/Base.pm
branches/DBIx-Class-Schema-Loader/back-compat/t/lib/dbixcsl_common_tests.pm
Log:
load external classes for dynamic schemas only
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-30 00:14:47 UTC (rev 7989)
+++ branches/DBIx-Class-Schema-Loader/back-compat/lib/DBIx/Class/Schema/Loader/Base.pm 2009-11-30 00:18:50 UTC (rev 7990)
@@ -438,13 +438,12 @@
close($fh)
or croak "Failed to close $real_inc_path: $!";
-# load the class too
- {
+ if ($self->dynamic) { # load the class too
# turn off redefined warnings
- $SIG{__WARN__} = sub {};
+ local $SIG{__WARN__} = sub {};
do $real_inc_path;
+ die $@ if $@;
}
- die $@ if $@;
}
=head2 load
Modified: branches/DBIx-Class-Schema-Loader/back-compat/t/lib/dbixcsl_common_tests.pm
===================================================================
--- branches/DBIx-Class-Schema-Loader/back-compat/t/lib/dbixcsl_common_tests.pm 2009-11-30 00:14:47 UTC (rev 7989)
+++ branches/DBIx-Class-Schema-Loader/back-compat/t/lib/dbixcsl_common_tests.pm 2009-11-30 00:18:50 UTC (rev 7990)
@@ -134,7 +134,7 @@
exit if $file_count != $expected_count;
- my $warn_count = 0;
+ my $warn_count = 2;
$warn_count++ if grep /ResultSetManager/, @loader_warnings;
if($self->{skip_rels}) {
More information about the Bast-commits
mailing list