Test::ForceExit - Ensure exit() is called by the end of a scope, force the issue.
exit()
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.
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; } ... }
The source code repository for Test::More can be found at http://github.com/Test-More/test-more/.
Copyright 2015 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
To install Test::Simple, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Test::Simple
CPAN shell
perl -MCPAN -e shell install Test::Simple
For more information on module installation, please visit the detailed CPAN module installation guide.