Merge 'multi_stuff' into 'trunk'
Rob Kinyon [Fri, 20 Feb 2009 09:18:05 +0000 (09:18 +0000)]
r27877@agaton (orig r5538):  robkinyon | 2009-02-20 03:18:05 +0000
Fixed some tests so they're now passing (things like bad plans and pod-coverage)

Changes
Makefile.PL
lib/DBIx/Class/Relationship/Base.pm
t/96multi_create.t

diff --git a/Changes b/Changes
index 9d7887b..a068719 100644 (file)
--- a/Changes
+++ b/Changes
@@ -23,6 +23,7 @@ Revision history for DBIx::Class
         - PG array datatype supported with SQLA >= 1.50
         - insert should use store_column, not set_column to avoid marking
           clean just-stored values as dirty. New test for this (groditi)
+        - regression test for source_name (groditi)
 
 0.08099_05 2008-10-30 21:30:00 (UTC)
         - Rewritte of Storage::DBI::connect_info(), extended with an
index f590d45..38a89db 100644 (file)
@@ -1,6 +1,7 @@
 use inc::Module::Install 0.67;
 use strict;
 use warnings;
+use POSIX ();
 
 use 5.006001; # delete this line if you want to send patches for earlier.
 
@@ -119,9 +120,14 @@ EOW
       exit 0;
   }
   else {
-      wait();
+      eval {
+          local $SIG{ALRM} = sub { die "timeout\n" };
+          alarm 5;
+          wait();
+          alarm 0;
+      };
       my $sig = $? & 127;
-      if ($sig == 11) {
+      if ($@ || $sig == POSIX::SIGSEGV) {
           warn (<<EOE);
 
 ############################### WARNING #################################
index f78bb6b..9e4a35a 100644 (file)
@@ -399,7 +399,7 @@ sub set_from_related {
     (ref $cond ? ref $cond : 'plain scalar')
   ) unless ref $cond eq 'HASH';
   if (defined $f_obj) {
-    my $f_class = $self->result_source->schema->class($rel_obj->{class});
+    my $f_class = $rel_obj->{class};
     $self->throw_exception( "Object $f_obj isn't a ".$f_class )
       unless Scalar::Util::blessed($f_obj) and $f_obj->isa($f_class);
   }
index 77cc347..9c75cac 100644 (file)
@@ -6,7 +6,7 @@ use Test::Exception;
 use lib qw(t/lib);
 use DBICTest;
 
-plan tests => 79;
+plan tests => 85;
 
 my $schema = DBICTest->init_schema();