[Bast-commits] r9202 - in DBIx-Class/0.08/trunk: lib/DBIx/Class t

ribasushi at dev.catalyst.perl.org ribasushi at dev.catalyst.perl.org
Sat Apr 24 00:27:47 GMT 2010


Author: ribasushi
Date: 2010-04-24 01:27:47 +0100 (Sat, 24 Apr 2010)
New Revision: 9202

Modified:
   DBIx-Class/0.08/trunk/lib/DBIx/Class/Schema.pm
   DBIx-Class/0.08/trunk/t/03podcoverage.t
   DBIx-Class/0.08/trunk/t/39load_namespaces_1.t
   DBIx-Class/0.08/trunk/t/72pg.t
Log:
Revert bogus commit

Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/Schema.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/Schema.pm	2010-04-24 00:24:23 UTC (rev 9201)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/Schema.pm	2010-04-24 00:27:47 UTC (rev 9202)
@@ -198,9 +198,7 @@
   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 @@
   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);
 

Modified: DBIx-Class/0.08/trunk/t/03podcoverage.t
===================================================================
--- DBIx-Class/0.08/trunk/t/03podcoverage.t	2010-04-24 00:24:23 UTC (rev 9201)
+++ DBIx-Class/0.08/trunk/t/03podcoverage.t	2010-04-24 00:27:47 UTC (rev 9202)
@@ -14,8 +14,8 @@
 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"
 }
 

Modified: DBIx-Class/0.08/trunk/t/39load_namespaces_1.t
===================================================================
--- DBIx-Class/0.08/trunk/t/39load_namespaces_1.t	2010-04-24 00:24:23 UTC (rev 9201)
+++ DBIx-Class/0.08/trunk/t/39load_namespaces_1.t	2010-04-24 00:27:47 UTC (rev 9202)
@@ -3,24 +3,22 @@
 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');
 my $rset_a   = DBICNSTest->resultset('A');

Modified: DBIx-Class/0.08/trunk/t/72pg.t
===================================================================
--- DBIx-Class/0.08/trunk/t/72pg.t	2010-04-24 00:24:23 UTC (rev 9201)
+++ DBIx-Class/0.08/trunk/t/72pg.t	2010-04-24 00:27:47 UTC (rev 9202)
@@ -146,7 +146,7 @@
 
   }
   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 @@
       });
     } '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,12 +262,7 @@
       }
   }
 
-  # make sure subqueried count still works
-  lives_ok ( sub {
 
-  }, 'for does not propagate on count subqueries');
-
-
 ######## other older Auto-pk tests
 
   $schema->source("SequenceTest")->name("dbic_t_schema.sequence_test");




More information about the Bast-commits mailing list