From: Rafael Kitover Date: Sun, 29 Nov 2009 05:03:34 +0000 (+0000) Subject: fix regular common tests X-Git-Tag: 0.04999_13~23^2~10 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9e8033c1b1da82a37e0897e70d25889b5b7c7dbd;hp=106a976aec1e51c87f260bd9a31de3692a8f3301;p=dbsrgits%2FDBIx-Class-Schema-Loader.git fix regular common tests --- diff --git a/lib/DBIx/Class/Schema/Loader/Base.pm b/lib/DBIx/Class/Schema/Loader/Base.pm index 33dff58..e1387e9 100644 --- a/lib/DBIx/Class/Schema/Loader/Base.pm +++ b/lib/DBIx/Class/Schema/Loader/Base.pm @@ -439,7 +439,11 @@ sub _load_external { or croak "Failed to close $real_inc_path: $!"; # load the class too - do $real_inc_path; + { + # turn off redefined warnings + $SIG{__WARN__} = sub {}; + do $real_inc_path; + } die $@ if $@; } diff --git a/t/lib/dbixcsl_common_tests.pm b/t/lib/dbixcsl_common_tests.pm index 54c4049..509ac66 100644 --- a/t/lib/dbixcsl_common_tests.pm +++ b/t/lib/dbixcsl_common_tests.pm @@ -118,7 +118,7 @@ sub setup_schema { is $file_count, 34, 'correct number of files generated'; exit if $file_count != 34; - my $warn_count = 2; + my $warn_count = 0; $warn_count++ if grep /ResultSetManager/, @loader_warnings; if($self->{skip_rels}) {