Indented.pm

filter: Statementstmt 72.4% 21 / 29 Branchbran 41.6% 5 / 12 Conditioncond 16.6% 2 / 12 MC/DCmcdc 0.0% 0 / 8 Subroutinesub 83.3% 5 / 6 Podpod n/a totaltotal 49.2% 33 / 67 CC 13 SCAR 27.1
CC
13
Cov
53%
import
19.0
import
19.0
BEGIN
1.0
CRAP 15.0
↑ Summary Indented/Handle.pm »
1 package Print::Indented;
2 2 ▶use 5.008005;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 2 ▶use Print::Indented::Handle;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 2 our $VERSION = '0.01';
8  
9 2 ▶sub import {
Subroutine import: called CC=7 SCAR=29.4
10 0 ▶ my $class = shift;
Subroutine import: not called CC=7 SCAR=29.4
11  
12 0 my ($pkg) = caller;
13 0 ▶ undef $pkg if $pkg eq 'main';
Branch: 2 branches
BranchTrueFalseTotal
if $pkg eq "main" 1 1 2
if $pkg eq "main" 0 0 0
14 0 ▶ undef $pkg if grep /^:all$/, @_;
Branch: 2 branches
BranchTrueFalseTotal
if grep /^:all$/, @_ 0 2 2
if grep /^:all$/, @_ 0 0 0
15  
16 0 ▶ our $STDOUT ||= Print::Indented::Handle->new(\*STDOUT);
Condition16%1/6
our $STDOUT ||= "Print::Indented::Handle"->new(\*STDOUT)
l!l&&r!l&&!r
020
our $STDOUT ||= "Print::Indented::Handle"->new(\*STDOUT)
l!l&&r!l&&!r
000
MC/DC0%0/2
our $STDOUT ||= "Print::Indented::Handle"->new(\*STDOUT)
our $STDOUT "Print::Indented::Handle"->new(\*STDOUT)
MC/DC0%0/2
our $STDOUT ||= "Print::Indented::Handle"->new(\*STDOUT)
our $STDOUT "Print::Indented::Handle"->new(\*STDOUT)
Truth table33%1/3
A ||= B
A= our $STDOUTB= "Print::Indented::Handle"->new(\*STDOUT)
ABresult
1X1
011
000
Truth table0%0/3
A ||= B
A= our $STDOUTB= "Print::Indented::Handle"->new(\*STDOUT)
ABresult
1X1
011
000
17 0 ▶ our $STDERR ||= Print::Indented::Handle->new(\*STDERR);
Condition16%1/6
our $STDERR ||= "Print::Indented::Handle"->new(\*STDERR)
l!l&&r!l&&!r
020
our $STDERR ||= "Print::Indented::Handle"->new(\*STDERR)
l!l&&r!l&&!r
000
MC/DC0%0/2
our $STDERR ||= "Print::Indented::Handle"->new(\*STDERR)
our $STDERR "Print::Indented::Handle"->new(\*STDERR)
MC/DC0%0/2
our $STDERR ||= "Print::Indented::Handle"->new(\*STDERR)
our $STDERR "Print::Indented::Handle"->new(\*STDERR)
Truth table33%1/3
A ||= B
A= our $STDERRB= "Print::Indented::Handle"->new(\*STDERR)
ABresult
1X1
011
000
Truth table0%0/3
A ||= B
A= our $STDERRB= "Print::Indented::Handle"->new(\*STDERR)
ABresult
1X1
011
000
18  
19 0 ▶ my $pkg_re = defined $pkg ? qr/^\Q$pkg\E$/ : qr//;
Branch: 2 branches
BranchTrueFalseTotal
defined $pkg ? : 1 1 2
defined $pkg ? : 0 0 0
20 0 $_->add_package_re($pkg_re) for $STDOUT, $STDERR;
21 }
22  
23 2 1;
24  
25 __END__
↑ Summary Indented/Handle.pm »