blib/lib/Test/MockObject/Universal.pm

filter: Statementstmt 52.6% 10 / 19 Branchbran n/a Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 42.8% 3 / 7 Podpod 100% 3 / 3 totaltotal 47.0% 16 / 34 CC 2 SCAR 9.7
CC
2
Cov
45%
new
6.0
AUTOLOAD
2.0
isa
2.0
CRAP 2.6
↑ Summary
1 package Test::MockObject::Universal;
2 {
3 2 $Test::MockObject::Universal::VERSION = '0.11';
4 }
5 2 ▶BEGIN {
Subroutine BEGIN: called CC=1 SCAR=0.0
6 2 $Test::MockObject::Universal::AUTHORITY = 'cpan:TEX';
7 }
8 # ABSTRACT: a truly universal mock object
9  
10 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 0 ▶sub new {
Subroutine new: not called CC=2 SCAR=17.9
Pod documented
14 0 my $that = shift;
15 0 ▶ my $class = ref($that) || $that;
Condition0%0/3
ref $that || $that
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $that || $that
ref $that $that
Truth table0%0/3
A || B
A= ref $thatB= $that
ABresult
1X1
011
000
16 0 my $self = {};
17 0 bless $self, $class;
18 0 return $self;
19 }
20  
21 # DGR: the whole purpose of this class is to provide autoloading ...
22 ## no critic (ProhibitAutoloading)
23 0 ▶sub AUTOLOAD {
Subroutine AUTOLOAD: not called CC=1 SCAR=6.9
24 0 my $self = shift;
25  
26 0 return ();
27 }
28 ## use critic
29  
30 0 ▶sub isa {
Subroutine isa: not called CC=1 SCAR=6.9
Pod documented
31 0 return 1;
32 }
33  
34 0 ▶sub can {
Subroutine can: not called CC=1 SCAR=6.9
Pod documented
35 0 return 1;
36 }
37  
38 2 1;
39  
40 __END__
↑ Summary