Subject: | Regression in 0.3.3 corrupts $! |
Hi, I see in the discussion for https://rt.cpan.org/Ticket/Display.html?id=105125 you were trying to localize $!. From what we can tell, this change caused exactly the opposite behavior.
A simplified test to show this problem is:
$>perl -E 'use Test::More tests => 1; use Test::Trap; local $! = 42; trap { die bless [], "Foo" }; $trap->die_isa_ok("Foo"); print int($!) . " (should be 42)<--\n";'
1..1
ok 1 - An object of class 'Foo' isa 'Foo'
0 <-- (should be 42)
In essence the localization in 0.3.3 seems to have actually corrupted $!.
I will submit a suggested patch to work around this in a second.