blib/lib/Aion/Meta/RequiresAnyFunction.pm

filter: Statementstmt 100% 15 / 15 Branchbran 100% 2 / 2 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 100% 5 / 5 Podpod 100% 3 / 3 totaltotal 86.6% 26 / 30 CC 3 SCAR 5.0
CC
3
Cov
90%
new
2.3
compare
2.0
BEGIN
1.0
CRAP 1.6
« blib/lib/Aion/Type/Lim.pm ↑ Summary blib/lib/Aion/Type/Espresso.pm »
1 package Aion::Meta::RequiresAnyFunction;
2  
3 6 ▶use common::sense;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 6 ▶use Aion::Meta::Util qw//;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 6 Aion::Meta::Util::create_getters(qw/pkg name/);
8  
9 5 ▶sub new {
Subroutine new: called CC=2 SCAR=8.1
Pod documented
10 5 my $cls = shift;
11 5 ▶ bless {@_}, ref $cls || $cls;
Condition33%1/3
ref $cls || $cls
l!l&&r!l&&!r
050
MC/DC0%0/2
ref $cls || $cls
ref $cls $cls
Truth table33%1/3
A || B
A= ref $clsB= $cls
ABresult
1X1
011
000
12 }
13  
14 3 ▶sub compare {
Subroutine compare: called CC=2 SCAR=6.9
Pod documented
15 3 my ($self, $other) = @_;
16  
17 3 ▶ die "Requires ${\ $self->stringify}" unless ref $other eq 'CODE';
Branch: 1 branch
BranchTrueFalseTotal
unless ref $other eq "CODE" 2 1 3
18 }
19  
20 3 ▶sub stringify {
Subroutine stringify: called CC=1 SCAR=0.0
Pod documented
21 3 my ($self) = @_;
22  
23 3 return "$self->{name} of $self->{pkg}";
24 }
25  
26 6 1;
27  
28 __END__
« blib/lib/Aion/Type/Lim.pm ↑ Summary blib/lib/Aion/Type/Espresso.pm »