Subject: | use_ok clobbers $SIG{__DIE__} |
$ cat Foo.pm
package Foo;
use strict;
use warnings;
$SIG{__DIE__} = sub { print 42 };
1;
$ cat foo.t
#!/usr/local/bin/perl
use strict;
use warnings;
use Test::More tests => 1;
BEGIN { use_ok('Foo') }
print "No handler\n" unless $SIG{__DIE__};
$ ./foo.t
1..1
ok 1 - use Foo;
No handler
$ cat bar.t
#!/usr/local/bin/perl
use strict;
use warnings;
use Test::More tests => 1;
use Foo;
print "No handler\n" unless $SIG{__DIE__};
is(1,1);
$ ./bar.t
1..1
ok 1
$
Roll back to 0.74 and:
$ ./foo.t
1..1
ok 1 - use Foo;
$