Expand ASSERT_NO_SPURIOUS_EXCEPTION_ACTION to set a rogue $SIG{__DIE__}
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / _Util.pm
index b5991fb..8c62054 100644 (file)
@@ -23,12 +23,6 @@ BEGIN {
 
     UNSTABLE_DOLLARAT => ( "$]" < 5.013002 ) ? 1 : 0,
 
-    DBICTEST => $INC{"DBICTest/Util.pm"} ? 1 : 0,
-
-    # During 5.13 dev cycle HELEMs started to leak on copy
-    # add an escape for these perls ON SMOKERS - a user will still get death
-    PEEPEENESS => ( eval { DBICTest::RunMode->is_smoker } && ( "$]" >= 5.013005 and "$]" <= 5.013006) ),
-
     ( map
       #
       # the "DBIC_" prefix below is crucial - this is what makes CI pick up
@@ -167,6 +161,7 @@ sub is_exception ($) {
 
   my ($not_blank, $suberror);
   {
+    local $SIG{__DIE__} if $SIG{__DIE__};
     local $@;
     eval {
       # The ne() here is deliberate - a plain length($e), or worse "$e" ne
@@ -276,9 +271,7 @@ sub is_exception ($) {
         unless $callstack_state->{in_internal_try};
 
       # always unset - someone may have snuck it in
-      local $SIG{__DIE__}
-        if $SIG{__DIE__};
-
+      local $SIG{__DIE__} if $SIG{__DIE__};
 
       if( $wantarray ) {
         @ret = $try_cref->();
@@ -389,8 +382,8 @@ sub modver_gt_or_eq ($$) {
     local $SIG{__WARN__} = sigwarn_silencer( qr/\Qisn't numeric in subroutine entry/ )
       if SPURIOUS_VERSION_CHECK_WARNINGS;
 
+    local $SIG{__DIE__} if $SIG{__DIE__};
     local $@;
-    local $SIG{__DIE__};
     eval { $mod->VERSION($ver) } ? 1 : 0;
   };