Skip Menu | will be shut down on March 1st, 2021.

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Test-Simple CPAN distribution.

Report information
The Basics
Id: 34065
Status: resolved
Priority: 0/
Queue: Test-Simple

Owner: Nobody in particular
Requestors: pjs [...]

Bug Information
Severity: Important
Broken in: 0.78
Fixed in: 0.74

Subject: use_ok clobbers $SIG{__DIE__}
Download (untitled) / with headers
text/plain 516b
$ cat 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; $
Subject: Re: [ #34065] use_ok clobbers $SIG{__DIE__}
Date: Thu, 13 Mar 2008 16:51:28 -0700
To: bug-Test-Simple [...]
From: Michael G Schwern <schwern [...]>
Download (untitled) / with headers
text/plain 299b
I see the problem. It's the same one that existed in The module is loaded inside an eval and Test::More localizes $SIG{__DIE__} to prevent any taking effect. This means any handler put in place in the used module is also localized. I'll have to do the same trick here as in
I've applied the SIG{__DIE__} fix from to svn.

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to