lib/XT/Files/Plugin.pm

filter: Statementstmt 100% 32 / 32 Branchbran 100% 6 / 6 Conditioncond 66.6% 2 / 3 MC/DCmcdc 50.0% 1 / 2 Subroutinesub 100% 9 / 9 Podpod 0.0% 0 / 2 totaltotal 92.5% 50 / 54 CC 5 SCAR 9.3
CC
5
Cov
98%
BUILD
5.0
BEGIN
1.0
BEGIN
1.0
CRAP 2.5
« blib/lib/XT/Files/Role/Logger.pm ↑ Summary blib/lib/Test/XTFiles.pm »
1 package XT::Files::Plugin;
2  
3 15 ▶use 5.006;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 15 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 15 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 15 our $VERSION = '0.001';
8  
9 15 ▶use Class::Tiny 1 qw(name xtf);
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 15 ▶use Role::Tiny::With ();
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 15 Role::Tiny::With::with 'XT::Files::Role::Logger';
14  
15 15 ▶use Carp ();
Subroutine BEGIN: called CC=1 SCAR=0.0
16 15 ▶use Scalar::Util ();
Subroutine BEGIN: called CC=1 SCAR=0.0
17  
18 sub BUILD {
19 44 ▶ my ( $self, $args ) = @_;
Subroutine BUILD: called CC=5 SCAR=16.1
Pod undocumented
20  
21 44 my $xtf = $self->xtf;
22 44 ▶ Carp::croak 'xtf attribute required' if !defined $xtf;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $xtf 6 38 44
23 38 ▶ Carp::croak q{'xtf' is not of class 'XT::Files'} if !defined Scalar::Util::blessed($xtf) || !$xtf->isa('XT::Files');
Branch: 1 branch
BranchTrueFalseTotal
unless defined builtin::blessed($xtf) and $xtf->isa("XT::Files") 5 33 38
Condition66%2/3
defined builtin::blessed($xtf) and $xtf->isa("XT::Files")
!ll&&!rl&&r
5033
MC/DC50%1/2
defined builtin::blessed($xtf) and $xtf->isa("XT::Files")
defined builtin::blessed($xtf) $xtf->isa("XT::Files")
Truth table66%2/3
A and B
A= defined builtin::blessed($xtf)B= $xtf->isa("XT::Files")
ABresult
0X0
100
111
24  
25 33 ▶ if ( !defined $self->name ) {
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $self->name) 31 2 33
26 31 $self->name( Scalar::Util::blessed($self) );
27 }
28  
29 33 return;
30 }
31  
32 sub log_prefix {
33 14 ▶ my ($self) = @_;
Subroutine log_prefix: called CC=1 SCAR=0.0
Pod undocumented
34  
35 14 return $self->name;
36 }
37  
38 15 1;
39  
40 __END__
« blib/lib/XT/Files/Role/Logger.pm ↑ Summary blib/lib/Test/XTFiles.pm »