Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Workaround for exit() in END-Block

by Tobiwan (Beadle)
on Jun 14, 2007 at 17:59 UTC ( [id://621300]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Use die() instead of exit() in Test::More
in thread Use die() instead of exit() in Test::More

I've to do more than send all Test as a simple mail, but I've solved like that (and I'm not that happy with it):
our $OUTPUT = ''; my $fh = IO::Handle->new(); open($fh, '>', \$OUTPUT); # Catch all output Test::More->builder->output($fh); Test::More->builder->failure_output($fh); Test::More->builder->todo_output($fh); ..testcode.. BAIL_OUT(..or other exit...) END { # This is called even after exit(), so I can access the output print STDOUT $OUTPUT; }

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://621300]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2024-04-25 07:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found