SixXS.pm

filter: Statementstmt 79.3% 23 / 29 Branchbran 0.0% 0 / 4 Conditioncond 0.0% 0 / 6 MC/DCmcdc 0.0% 0 / 3 Subroutinesub 87.5% 7 / 8 Podpod 100% 1 / 1 totaltotal 60.7% 31 / 51 CC 5 SCAR 25.7
CC
5
Cov
59%
diag
30.0
BEGIN
1.0
BEGIN
1.0
CRAP 13.1
« SixXS/TIC/Server.pm ↑ Summary SixXS/TIC/Server/AnyEvent.pm »
1 package Net::SixXS;
2 1 ▶use v5.010;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 1 ▶use version; our $VERSION = version->declare("v0.1.1");
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 1 ▶use Carp 'croak';
Subroutine BEGIN: called CC=1 SCAR=0.0
9 1 ▶use Scalar::Util 'blessed';
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 1 ▶use Net::SixXS::Diag::None;
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 1 my $diag = Net::SixXS::Diag::None->new();
14  
15 sub diag(;$)
16 0 ▶{
Subroutine diag: not called CC=5 SCAR=34.0
Pod documented
17 0 my ($v) = @_;
18  
19 0 ▶ if (defined $v) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $v) 0 0 0
20 0 ▶ if (!blessed $v || !$v->can('does') ||
Branch: 1 branch
BranchTrueFalseTotal
unless (builtin::blessed($v) and $v->can("does") and $v->does("Net::SixXS::Diag")) 0 0 0
Condition0%0/6
builtin::blessed($v) and $v->can("does") and $v->does("Net::SixXS::Diag")
!ll&&!rl&&r
000
builtin::blessed($v) and $v->can("does")
!ll&&!rl&&r
000
MC/DC0%0/3
builtin::blessed($v) and $v->can("does") and $v->does("Net::SixXS::Diag")
builtin::blessed($v) $v->can("does") $v->does("Net::SixXS::Diag")
Truth table0%0/4
A and B and C
A= builtin::blessed($v)B= $v->can("does")C= $v->does("Net::SixXS::Diag")
ABCresult
0XX0
10X0
1100
1111
21 !$v->does('Net::SixXS::Diag')) {
22 0 croak 'Net::SixXS::diag() needs an object that '.
23 'does Net::SixXS::Diag';
24 }
25 0 $diag = $v;
26 }
27 0 return $diag;
28 }
29  
30 1 1;
31 __END__
« SixXS/TIC/Server.pm ↑ Summary SixXS/TIC/Server/AnyEvent.pm »