This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
In t/op/reset.t, don't eval "" in void context - die if something goes wrong.
authorNicholas Clark <nick@ccl4.org>
Mon, 11 Apr 2011 19:51:06 +0000 (20:51 +0100)
committerNicholas Clark <nick@ccl4.org>
Thu, 19 May 2011 07:55:56 +0000 (08:55 +0100)
Because sometimes the "it can never happen" does. For example, "panic: free
from wrong pool". And it's awfully confusing if the error message is eaten.
There's not even a "I barfed you an error but then I eated it" caption to give
a clue about what happened.

t/op/reset.t

index e1486a5..3094979 100644 (file)
@@ -98,7 +98,7 @@ use threads;
 use threads::shared;
 
 sub wipe {
-    eval 'no warnings; sub b {}';
+    eval 'no warnings; sub b {}; 1' or die $@;
 }
 
 sub lock_then_wipe {