NAME
Test::ForceExit - Ensure exit()
is called by the end of a scope, force the issue.
DESCRIPTION
Sometimes you need to fork. Sometimes the forked process can throw an exception to exit. If you forked below an eval the exception will be cought and you suddenly have an unexpected process running amok. This module can be used to protect you from such issues.
SYNOPSYS
eval {
...
my $pid = fork;
unless($pid) {
require Test::Stream::ForceExit;
my $force_exit = Test::Stream::ForceExit->new;
thing_that_can_die();
# We did not die, turn off the forced exit.
$force_exit->done(1);
# Do the exit we intend.
exit 0;
}
...
}
SOURCE
The source code repository for Test::More can be found at http://github.com/Test-More/test-more/.
MAINTAINER
AUTHORS
COPYRIGHT
Copyright 2014 Chad Granum <exodist7@gmail.com>.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See http://www.perl.com/perl/misc/Artistic.html