From: Peter Rabbitson Date: Sat, 24 Apr 2010 00:27:47 +0000 (+0000) Subject: Revert bogus commit X-Git-Tag: v0.08122~108 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0647e0cc4a0845da7df3775b1b56bd2b6f9efeb2;p=dbsrgits%2FDBIx-Class.git Revert bogus commit --- diff --git a/lib/DBIx/Class/Schema.pm b/lib/DBIx/Class/Schema.pm index a900056..cea821a 100644 --- a/lib/DBIx/Class/Schema.pm +++ b/lib/DBIx/Class/Schema.pm @@ -198,9 +198,7 @@ sub _ns_get_rsrc_instance { my $rs = ref ($_[0]) || $_[0]; if ($rs->can ('result_source_instance') ) { - my $x = $rs->result_source_instance; - use Data::Dumper; - die Dumper $x; + return $rs->result_source_instance; } else { $class->throw_exception ( @@ -1318,8 +1316,6 @@ sub _register_source { my $orig_source = $source; $source = $source->new({ %$source, source_name => $moniker }); - use Data::Dumper; - die Dumper $source; $source->schema($self); Scalar::Util::weaken($source->{schema}) if ref($self); diff --git a/t/03podcoverage.t b/t/03podcoverage.t index 26095f8..3115234 100644 --- a/t/03podcoverage.t +++ b/t/03podcoverage.t @@ -14,8 +14,8 @@ unless ( DBICTest::AuthorCheck->is_author || $ENV{AUTOMATED_TESTING} || $ENV{REL require DBIx::Class; unless ( DBIx::Class::Optional::Dependencies->req_ok_for ('test_podcoverage') ) { my $missing = DBIx::Class::Optional::Dependencies->req_missing_for ('test_podcoverage'); - DBICTest::AuthorCheck->is_author - ? die ("Failed to load author-testing module requirements: $missing") + $ENV{RELEASE_TESTING} || DBICTest::AuthorCheck->is_author + ? die ("Failed to load release-testing module requirements: $missing") : plan skip_all => "Test needs: $missing" } diff --git a/t/39load_namespaces_1.t b/t/39load_namespaces_1.t index bf78380..5798518 100644 --- a/t/39load_namespaces_1.t +++ b/t/39load_namespaces_1.t @@ -3,23 +3,21 @@ use strict; use warnings; use Test::More; -use Test::Warn; use lib qw(t/lib); use DBICTest; # do not remove even though it is not used -warnings_exist ( - sub { +my $warnings; +eval { + local $SIG{__WARN__} = sub { $warnings .= shift }; package DBICNSTest; use base qw/DBIx::Class::Schema/; __PACKAGE__->load_namespaces; - }, - [ - qr/load_namespaces found ResultSet class C with no corresponding Result class/, - qr/load_namespaces found ResultSet class DBICNSTest::ResultSet::D that does not subclass DBIx::Class::ResultSet/, - ], - 'Found warning about extra ResultSet classes, and incorrectly subclassed ResultSets', -); +}; +ok(!$@, 'load_namespaces doesnt die') or diag $@; +like($warnings, qr/load_namespaces found ResultSet class C with no corresponding Result class/, 'Found warning about extra ResultSet classes'); + +like($warnings, qr/load_namespaces found ResultSet class DBICNSTest::ResultSet::D that does not subclass DBIx::Class::ResultSet/, 'Found warning about ResultSets with incorrect subclass'); my $source_a = DBICNSTest->source('A'); isa_ok($source_a, 'DBIx::Class::ResultSource::Table'); diff --git a/t/72pg.t b/t/72pg.t index 738a5ff..542b915 100644 --- a/t/72pg.t +++ b/t/72pg.t @@ -146,7 +146,7 @@ for my $use_insert_returning ($test_server_supports_insert_returning } SKIP: { - skip "Need DBD::Pg 2.9.2 or newer for array tests", 5 if $DBD::Pg::VERSION < 2.009002; + skip "Need DBD::Pg 2.9.2 or newer for array tests", 4 if $DBD::Pg::VERSION < 2.009002; lives_ok { $schema->resultset('ArrayTest')->create({ @@ -160,14 +160,8 @@ for my $use_insert_returning ($test_server_supports_insert_returning }); } 'updating arrayref as pg array data'; - lives_ok { - my $row = $schema->resultset('ArrayTest')->next; - $row->arrayfield ([5, 6]); - $row->update; - } 'updating dirty arrayref as pg array data'; - $schema->resultset('ArrayTest')->create({ - arrayfield => [7, 8], + arrayfield => [5, 6], }); my $count; @@ -268,11 +262,6 @@ for my $use_insert_returning ($test_server_supports_insert_returning } } - # make sure subqueried count still works - lives_ok ( sub { - - }, 'for does not propagate on count subqueries'); - ######## other older Auto-pk tests