| 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
MC/DC0%0/2
ref $that || $that
ref $that
$that
Truth table0%0/3
A || B
A= ref $thatB= $that
| |||||||||||||||||||||
| 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__ | ||||||||||||||||||||