Log4perl.pm

filter: Statementstmt 100% 18 / 18 Branchbran 100% 4 / 4 Conditioncond 100% 3 / 3 MC/DCmcdc 100% 2 / 2 Subroutinesub 100% 5 / 5 Podpod 100% 1 / 1 totaltotal 100% 33 / 33 CC 4 SCAR 9.2
CC
4
Cov
100%
log
4.0
BEGIN
1.0
BEGIN
1.0
CRAP 2.5
↑ Summary Log4perl/Easy.pm »
1 package MooseX::Log::Log4perl;
2  
3 4 ▶use 5.008;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 4 ▶use Moo::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 4 ▶use Log::Log4perl;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 4 our $VERSION = '0.47';
8  
9 has 'logger' => (
10 is => 'rw',
11 lazy => 1,
12 4 ▶ default => sub { return Log::Log4perl->get_logger(ref($_[0])) }
Subroutine __ANON__: called CC=1 SCAR=0.0
13 4 );
14  
15 15 ▶sub log {
Subroutine log: called CC=4 SCAR=13.9
Pod documented
16 15 my $self = shift;
17 15 my $cat = shift;
18 15 ▶ if ($cat && $cat =~ m/^(\.|::)/) {
Branch: 2 branches
BranchTrueFalseTotal
if ($cat and $cat =~ /^(\.|::)/) { } 2 13 15
elsif ($cat) { } 2 11 13
Condition100%3/3
$cat and $cat =~ /^(\.|::)/
!ll&&!rl&&r
1122
MC/DC100%2/2
$cat and $cat =~ /^(\.|::)/
$cat $cat =~ /^(\.|::)/
Truth table100%3/3
A and B
A= $catB= $cat =~ /^(\.|::)/
ABresult
0X0
100
111
19 2 return Log::Log4perl->get_logger(ref($self) . $cat);
20 } elsif($cat) {
21 2 return Log::Log4perl->get_logger($cat);
22 } else {
23 11 return $self->logger;
24 }
25 }
26  
27 4 1;
28  
29 __END__
↑ Summary Log4perl/Easy.pm »