Fix POISON_ENV warning missed in both 5c33c8be and 44c1a75d
[dbsrgits/DBIx-Class.git] / t / lib / DBICTest / BaseSchema.pm
index 726ce10..aaaf955 100644 (file)
@@ -96,7 +96,7 @@ if( $ENV{DBICTEST_ASSERT_NO_SPURIOUS_EXCEPTION_ACTION} ) {
       (
         caller(0) eq 'main'
           and
-        (caller(1))[0] !~ $interesting_ns_rx
+        ( (caller(1))[0] || '' ) !~ $interesting_ns_rx
       )
     );
 
@@ -262,7 +262,7 @@ sub connection {
       # we need to work with a forced fresh clone so that we do not upset any state
       # of the main $schema (some tests examine it quite closely)
       local $SIG{__WARN__} = sub {};
-      local $SIG{__DIE__};
+      local $SIG{__DIE__} if $SIG{__DIE__};
       local $@;
 
       # this will either give us an undef $locktype or will determine things