Created
September 7, 2011 08:33
-
-
Save lestrrat/1200059 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use strict; | |
use Devel::Cover; | |
my $pid = fork(); | |
if ( $pid ) { | |
wait; | |
} else { | |
system "/bin/ls"; # shows output of ls on my console | |
# exec "/bin/ls"; # doesn't show output of ls :/ | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use strict; | |
use Devel::Cover; | |
my $pid = fork(); | |
if ( $pid ) { | |
wait; | |
} else { | |
Devel::Cover::report(); # dies | |
exec "/bin/ls"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use strict; | |
use Devel::Cover; | |
my $pid = fork(); | |
if ( $pid ) { | |
wait; | |
} else { | |
# WORKS!!!! | |
eval { Devel::Cover::report() }; | |
exec "/bin/ls"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment