blib/lib/Devel/ebug/Backend/Plugin/Output.pm

filter: Statementstmt 88.8% 16 / 18 Branchbran 50.0% 3 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 75.0% 3 / 4 Podpod 0.0% 0 / 2 totaltotal 73.3% 22 / 30 CC 1 SCAR 2.2
CC
1
Cov
79%
output
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« blib/lib/Devel/ebug/Backend/Plugin/Commands.pm ↑ Summary blib/lib/Devel/ebug/Backend/Plugin/StackTrace.pm »
1 package Devel::ebug::Backend::Plugin::Output;
2  
3 6 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 6 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 6 our $VERSION = '0.69'; # VERSION
7  
8 6 my $stdout = "";
9 6 my $stderr = "";
10  
11 # Capture the program's output so the frontend can show it. Under
12 # PERL_DEBUG_DONT_RELAY_IO (ebug_server -keepio) STDOUT and STDERR are
13 # deliberately left going wherever they were going, so that a program
14 # which prompts can still be used interactively; output then has nothing
15 # to report.
16 6 ▶unless ($ENV{PERL_DEBUG_DONT_RELAY_IO}) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($ENV{"PERL_DEBUG_DONT_RELAY_IO"}) 6 0 6
17 6 close STDOUT;
18 6 ▶ open STDOUT, '>', \$stdout or die "Can't open STDOUT: $!";
Branch: 1 branch
BranchTrueFalseTotal
open STDOUT, ">", \$stdout or die "Can't open STDOUT: $!" 6 0 6
19 6 close STDERR;
20 6 ▶ open STDERR, '>', \$stderr or die "Can't open STDERR: $!";
Branch: 1 branch
BranchTrueFalseTotal
open STDERR, ">", \$stderr or die "Can't open STDERR: $!" 6 0 6
21 }
22  
23 6 ▶sub register_commands {
Subroutine register_commands: called CC=1 SCAR=0.0
Pod undocumented
24 6 return (output => { sub => \&output });
25 }
26  
27 0 ▶sub output {
Subroutine output: not called CC=1 SCAR=6.9
Pod undocumented
28 0 my($req, $context) = @_;
29 return {
30 0 stdout => $stdout,
31 stderr => $stderr,
32 };
33 }
34  
35 6 1;
36  
37 __END__
« blib/lib/Devel/ebug/Backend/Plugin/Commands.pm ↑ Summary blib/lib/Devel/ebug/Backend/Plugin/StackTrace.pm »