Error
view release on metacpan or search on metacpan
t/08warndie.t view on Meta::CPAN
# This file's name - for string matching. We need to quotemeta it, because on
# Win32, the filename is t\08warndie.t, and we don't want that accidentally
# matching an (invalid) \08 octal digit
my $file = qr/\Q$0\E/;
# Most of these tests are fatal, and print data on STDERR. We therefore use
# this testing function to run a CODEref in a child process and captures its
# STDERR and note whether the CODE block exited
my ( $s, $felloffcode );
my $linekid = __LINE__ + 15; # the $code->() is 15 lines below this one
sub run_kid(&)
{
my ( $code ) = @_;
# Win32's fork() emulation can't correctly handle the open("-|") case yet
# So we'll implement this manually - inspired by 'perldoc perlfork'
pipe my $childh, my $child or die "Cannot pipe() - $!";
defined( my $kid = fork() ) or die "Cannot fork() - $!";
if ( !$kid ) {
close $childh;
( run in 0.909 second using v1.01-cache-2.11-cpan-49f99fa48dc )