| 1 | package classes::Test; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3 | # $Id: Test.pm 147 2008-03-08 16:04:33Z rmuhle $ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5 | # these two are just really brain dead | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 6 | # when using more advanced perl stuff | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 7 | 5 | ▶ | no strict; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 8 | 5 | ▶ | no warnings; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 9 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 10 | 5 | ▶ | use Scalar::Util 'blessed'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 11 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 12 | 5 | ▶ | use base 'Exporter'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 13 | 5 | our @EXPORT_OK = qw( | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 14 | can_new | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 15 | can_set_get | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 16 | has_decl | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 17 | has_class_const | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 18 | has_mixins | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 19 | has_mixins_hash | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 20 | is_classes | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 21 | is_throwable | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 22 | is_classes_exc | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 23 | has_tree | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 24 | ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 25 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 26 | 5 | our %EXPORT_TAGS = ( 'all' => [qw( | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 27 | can_new | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 28 | can_set_get | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 29 | has_decl | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 30 | has_class_const | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 31 | has_mixins | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 32 | has_mixins_hash | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 33 | is_classes | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 34 | is_throwable | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 35 | is_classes_exc | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 36 | )]); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 37 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 38 | 5 | ▶ | use Test::Builder; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 39 | 5 | ▶ | use Test::More; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 40 | 5 | my $t = Test::Builder->new(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 41 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 42 | 13 | ▶ | sub can_new (*) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
can_new: called CC=3 SCAR=14.2
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 43 | 13 | ▶ | my $this = blessed $_[0] || $_[0]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition33%1/3
builtin::blessed($_[0]) || $_[0]
MC/DC0%0/2
builtin::blessed($_[0]) || $_[0]
builtin::blessed($_[0])
$_[0]
Truth table33%1/3
A || B
A= builtin::blessed($_[0])B= $_[0]
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 44 | 13 | ▶ | return $t->ok( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition33%1/3
$t->ok($this->can('new'), "'${this}' has new constructor method") || $t->diag(" '${this}' missing new constructor")
MC/DC0%0/2
$t->ok($this->can('new'), "'${this}' has new constructor method") || $t->diag(" '${this}' missing new constructor")
$t->ok($this->can('new'), "'${this}' has new constructor method")
$t->diag(" '${this}' missing new constructor")
Truth table33%1/3
A || B
A= $t->ok($this->can('new'), "'${this}' has new constructor method")B= $t->diag(" '${this}' missing new constructor")
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 45 | $this->can('new'), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 46 | "'$this' has new constructor method" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 47 | ) || | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 48 | $t->diag( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 49 | " '$this' missing new constructor" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 50 | ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 51 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 52 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 53 | 0 | ▶ | sub can_set_get (*) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
can_set_get: not called CC=4 SCAR=30.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 54 | 0 | ▶ | my $this = blessed $_[0] || $_[0]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
builtin::blessed($_[0]) || $_[0]
MC/DC0%0/2
builtin::blessed($_[0]) || $_[0]
builtin::blessed($_[0])
$_[0]
Truth table0%0/3
A || B
A= builtin::blessed($_[0])B= $_[0]
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 55 | 0 | ▶ | return $t->ok( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/6
$t->ok($this->can('set') && $this->can('get'), "'${this}' can set, get") || $t->diag(" '${this}' missing set, get")
$this->can('set') && $this->can('get')
MC/DC0%0/2
$t->ok($this->can('set') && $this->can('get'), "'${this}' can set, get") || $t->diag(" '${this}' missing set, get")
$t->ok($this->can('set') && $this->can('get'), "'${this}' can set, get")
$t->diag(" '${this}' missing set, get")
MC/DC0%0/2
$this->can('set') && $this->can('get')
$this->can('set')
$this->can('get')
Truth table0%0/3
A || B
A= $t->ok($this->can('set') && $this->can('get'), "'${this}' can set, get")B= $t->diag(" '${this}' missing set, get")
Truth table0%0/3
A && B
A= $this->can('set')B= $this->can('get')
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 56 | $this->can('set') | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 57 | && $this->can('get') | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 58 | , "'$this' can set, get" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 59 | ) || | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 60 | $t->diag(" '$this' missing set, get"); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 61 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 62 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 63 | # should have a DECL hash ref package variable and method | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 64 | 13 | ▶ | sub has_decl (*) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
has_decl: called CC=4 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 65 | 13 | ▶ | my $this = blessed $_[0] || $_[0]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition33%1/3
builtin::blessed($_[0]) || $_[0]
MC/DC0%0/2
builtin::blessed($_[0]) || $_[0]
builtin::blessed($_[0])
$_[0]
Truth table33%1/3
A || B
A= builtin::blessed($_[0])B= $_[0]
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 66 | return $t->ok( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 67 | $this->can('DECL') && | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 68 | 13 | ▶ | defined ${$this.'::DECL'}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition33%2/6
$t->ok($this->can('DECL') && defined ${$this . '::DECL';}, "'${this}' has DECL") || $t->diag(" '${this}' does not have a DECL declaration")
$this->can('DECL') && defined ${$this . '::DECL';}
MC/DC0%0/2
$t->ok($this->can('DECL') && defined ${$this . '::DECL';}, "'${this}' has DECL") || $t->diag(" '${this}' does not have a DECL declaration")
$t->ok($this->can('DECL') && defined ${$this . '::DECL';}, "'${this}' has DECL")
$t->diag(" '${this}' does not have a DECL declaration")
MC/DC0%0/2
$this->can('DECL') && defined ${$this . '::DECL';}
$this->can('DECL')
defined ${$this . '::DECL';}
Truth table33%1/3
A || B
A= $t->ok($this->can('DECL') && defined ${$this . '::DECL';}, "'${this}' has DECL")B= $t->diag(" '${this}' does not have a DECL declaration")
Truth table33%1/3
A && B
A= $this->can('DECL')B= defined ${$this . '::DECL';}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 69 | "'$this' has DECL" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 70 | ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 71 | || $t->diag(" '$this' does not have a DECL declaration"); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 72 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 73 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 74 | 13 | ▶ | sub has_class_const (*) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
has_class_const: called CC=4 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 75 | 13 | ▶ | my $this = blessed $_[0] || $_[0]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition33%1/3
builtin::blessed($_[0]) || $_[0]
MC/DC0%0/2
builtin::blessed($_[0]) || $_[0]
builtin::blessed($_[0])
$_[0]
Truth table33%1/3
A || B
A= builtin::blessed($_[0])B= $_[0]
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 76 | return $t->ok( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 77 | $this->can('CLASS') && | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 78 | 13 | ▶ | defined ${$this.'::CLASS'}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition33%2/6
$t->ok($this->can('CLASS') && defined ${$this . '::CLASS';}, "'${this}' has CLASS constant") || $t->diag(" '${this}' does not have a CLASS constant")
$this->can('CLASS') && defined ${$this . '::CLASS';}
MC/DC0%0/2
$t->ok($this->can('CLASS') && defined ${$this . '::CLASS';}, "'${this}' has CLASS constant") || $t->diag(" '${this}' does not have a CLASS constant")
$t->ok($this->can('CLASS') && defined ${$this . '::CLASS';}, "'${this}' has CLASS constant")
$t->diag(" '${this}' does not have a CLASS constant")
MC/DC0%0/2
$this->can('CLASS') && defined ${$this . '::CLASS';}
$this->can('CLASS')
defined ${$this . '::CLASS';}
Truth table33%1/3
A || B
A= $t->ok($this->can('CLASS') && defined ${$this . '::CLASS';}, "'${this}' has CLASS constant")B= $t->diag(" '${this}' does not have a CLASS constant")
Truth table33%1/3
A && B
A= $this->can('CLASS')B= defined ${$this . '::CLASS';}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 79 | "'$this' has CLASS constant" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 80 | ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 81 | || $t->diag(" '$this' does not have a CLASS constant"); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 82 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 83 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 84 | 0 | ▶ | sub has_mixins (*) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
has_mixins: not called CC=4 SCAR=25.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 85 | 0 | ▶ | my $this = blessed $_[0] || $_[0]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
builtin::blessed($_[0]) || $_[0]
MC/DC0%0/2
builtin::blessed($_[0]) || $_[0]
builtin::blessed($_[0])
$_[0]
Truth table0%0/3
A || B
A= builtin::blessed($_[0])B= $_[0]
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 86 | 5 | ▶ | no strict 'refs'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 87 | return $t->ok( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 88 | $this->can('MIXIN') && | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 89 | 0 | ▶ | scalar %{${$this.'::MIXIN'}}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/5
$t->ok($this->can('MIXIN') && scalar %{${$this . '::MIXIN';};}, "'${this}' has MIXINs") || $t->diag(" '${this}' does not have a CLASS constant")
$this->can('MIXIN') && scalar %{${$this . '::MIXIN';};}
MC/DC0%0/2
$t->ok($this->can('MIXIN') && scalar %{${$this . '::MIXIN';};}, "'${this}' has MIXINs") || $t->diag(" '${this}' does not have a CLASS constant")
$t->ok($this->can('MIXIN') && scalar %{${$this . '::MIXIN';};}, "'${this}' has MIXINs")
$t->diag(" '${this}' does not have a CLASS constant")
MC/DC0%0/1
$this->can('MIXIN') && scalar %{${$this . '::MIXIN';};}
$this->can('MIXIN')
Truth table0%0/3
A || B
A= $t->ok($this->can('MIXIN') && scalar %{${$this . '::MIXIN';};}, "'${this}' has MIXINs")B= $t->diag(" '${this}' does not have a CLASS constant")
Truth table0%0/2
A
A= $this->can('MIXIN')
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 90 | "'$this' has MIXINs" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 91 | ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 92 | || $t->diag(" '$this' does not have a CLASS constant"); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 93 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 94 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 95 | 0 | ▶ | sub has_mixins_hash (*) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
has_mixins_hash: not called CC=4 SCAR=25.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 96 | 0 | ▶ | my $this = blessed $_[0] || $_[0]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
builtin::blessed($_[0]) || $_[0]
MC/DC0%0/2
builtin::blessed($_[0]) || $_[0]
builtin::blessed($_[0])
$_[0]
Truth table0%0/3
A || B
A= builtin::blessed($_[0])B= $_[0]
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 97 | 5 | ▶ | no strict 'refs'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 98 | return $t->ok( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 99 | $this->can('MIXIN') && | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 100 | 0 | ▶ | ref ${$this.'::MIXIN'} eq 'HASH', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/6
$t->ok($this->can('MIXIN') && ref ${$this . '::MIXIN';} eq 'HASH', "'${this}' has MIXIN hash defined") || $t->diag(" '${this}' does not have a MIXIN hash")
$this->can('MIXIN') && ref ${$this . '::MIXIN';} eq 'HASH'
MC/DC0%0/2
$t->ok($this->can('MIXIN') && ref ${$this . '::MIXIN';} eq 'HASH', "'${this}' has MIXIN hash defined") || $t->diag(" '${this}' does not have a MIXIN hash")
$t->ok($this->can('MIXIN') && ref ${$this . '::MIXIN';} eq 'HASH', "'${this}' has MIXIN hash defined")
$t->diag(" '${this}' does not have a MIXIN hash")
MC/DC0%0/2
$this->can('MIXIN') && ref ${$this . '::MIXIN';} eq 'HASH'
$this->can('MIXIN')
ref ${$this . '::MIXIN';} eq 'HASH'
Truth table0%0/3
A || B
A= $t->ok($this->can('MIXIN') && ref ${$this . '::MIXIN';} eq 'HASH', "'${this}' has MIXIN hash defined")B= $t->diag(" '${this}' does not have a MIXIN hash")
Truth table0%0/3
A && B
A= $this->can('MIXIN')B= ref ${$this . '::MIXIN';} eq 'HASH'
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 101 | "'$this' has MIXIN hash defined" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 102 | ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 103 | || $t->diag(" '$this' does not have a MIXIN hash"); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 104 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 105 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 106 | 13 | ▶ | sub is_classes (*) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
is_classes: called CC=5 SCAR=22.7
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 107 | 13 | ▶ | my $this = blessed $_[0] || $_[0]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition33%1/3
builtin::blessed($_[0]) || $_[0]
MC/DC0%0/2
builtin::blessed($_[0]) || $_[0]
builtin::blessed($_[0])
$_[0]
Truth table33%1/3
A || B
A= builtin::blessed($_[0])B= $_[0]
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 108 | 13 | ▶ | return $t->ok( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition33%3/9
$t->ok(&can_new($this) && &has_class_const($this) && &has_decl($this), "'${this}' is a classes class") || $t->diag(" '${this}' does not look like a classes class")
&can_new($this) && &has_class_const($this) && &has_decl($this)
&can_new($this) and &has_class_const($this)
MC/DC0%0/2
$t->ok(&can_new($this) && &has_class_const($this) && &has_decl($this), "'${this}' is a classes class") || $t->diag(" '${this}' does not look like a classes class")
$t->ok(&can_new($this) && &has_class_const($this) && &has_decl($this), "'${this}' is a classes class")
$t->diag(" '${this}' does not look like a classes class")
MC/DC0%0/3
&can_new($this) && &has_class_const($this) && &has_decl($this)
&can_new($this)
&has_class_const($this)
&has_decl($this)
Truth table33%1/3
A || B
A= $t->ok(&can_new($this) && &has_class_const($this) && &has_decl($this), "'${this}' is a classes class")B= $t->diag(" '${this}' does not look like a classes class")
Truth table25%1/4
A and B && C
A= &can_new($this)B= &has_class_const($this)C= &has_decl($this)
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 109 | can_new($this) && | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 110 | has_class_const($this) && | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 111 | has_decl($this), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 112 | "'$this' is a classes class" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 113 | ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 114 | || $t->diag(" '$this' does not look like a classes class"); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 115 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 116 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 117 | 4 | ▶ | sub is_throwable (*) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
is_throwable: called CC=8 SCAR=31.1
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 118 | 4 | ▶ | my $this = blessed $_[0] || $_[0]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition33%1/3
builtin::blessed($_[0]) || $_[0]
MC/DC0%0/2
builtin::blessed($_[0]) || $_[0]
builtin::blessed($_[0])
$_[0]
Truth table33%1/3
A || B
A= builtin::blessed($_[0])B= $_[0]
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 119 | 4 | ▶ | return $t->ok( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition33%6/18
$t->ok($this->can('throw') && $this->can('rethrow') && $this->can('send') && $this->can('catch') && $this->can('caught') && $this->can('capture'), "'${this}' fulfills the classes::Throwable interface") || $t->diag(" '${this}' does not fulfill the classes::Throwable interface")
$this->can('throw') && $this->can('rethrow') && $this->can('send') && $this->can('catch') && $this->can('caught') && $this->can('capture')
$this->can("throw") and $this->can("rethrow") and $this->can("send") and $this->can("catch") and $this->can("caught")
$this->can("throw") and $this->can("rethrow") and $this->can("send") and $this->can("catch")
$this->can("throw") and $this->can("rethrow") and $this->can("send")
$this->can("throw") and $this->can("rethrow")
MC/DC0%0/2
$t->ok($this->can('throw') && $this->can('rethrow') && $this->can('send') && $this->can('catch') && $this->can('caught') && $this->can('capture'), "'${this}' fulfills the classes::Throwable interface") || $t->diag(" '${this}' does not fulfill the classes::Throwable interface")
$t->ok($this->can('throw') && $this->can('rethrow') && $this->can('send') && $this->can('catch') && $this->can('caught') && $this->can('capture'), "'${this}' fulfills the classes::Throwable interface")
$t->diag(" '${this}' does not fulfill the classes::Throwable interface")
MC/DC0%0/6
$this->can('throw') && $this->can('rethrow') && $this->can('send') && $this->can('catch') && $this->can('caught') && $this->can('capture')
$this->can("throw")
$this->can("rethrow")
$this->can("send")
$this->can("catch")
$this->can("caught")
$this->can('capture')
Truth table33%1/3
A || B
A= $t->ok($this->can('throw') && $this->can('rethrow') && $this->can('send') && $this->can('catch') && $this->can('caught') && $this->can('capture'), "'${this}' fulfills the classes::Throwable interface")B= $t->diag(" '${this}' does not fulfill the classes::Throwable interface")
Truth table14%1/7
A and B and C and D and E && F
A= $this->can("throw")B= $this->can("rethrow")C= $this->can("send")D= $this->can("catch")E= $this->can("caught")F= $this->can('capture')
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 120 | $this->can('throw') && | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 121 | $this->can('rethrow') && | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 122 | $this->can('send') && | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 123 | $this->can('catch') && | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 124 | $this->can('caught') && | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 125 | $this->can('capture'), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 126 | "'$this' fulfills the classes::Throwable interface" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 127 | ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 128 | || $t->diag(" '$this' does not fulfill the classes::Throwable interface"); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 129 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 130 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 131 | 3 | ▶ | sub is_classes_exc (*) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
is_classes_exc: called CC=6 SCAR=25.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 132 | 3 | ▶ | my $this = blessed $_[0] || $_[0]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition33%1/3
builtin::blessed($_[0]) || $_[0]
MC/DC0%0/2
builtin::blessed($_[0]) || $_[0]
builtin::blessed($_[0])
$_[0]
Truth table33%1/3
A || B
A= builtin::blessed($_[0])B= $_[0]
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 133 | 3 | ▶ | return $t->ok( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition33%4/12
$t->ok(&is_classes($this) && $this->can('as_string') && &like(scalar $this->new->as_string, qr/^$this/, 'as_string matches') && &is_throwable($this), "'${this}' is a classes::Exception class") || $t->diag(" '${this}' does not look like a classes::Exception class")
&is_classes($this) && $this->can('as_string') && &like(scalar $this->new->as_string, qr/^$this/, 'as_string matches') && &is_throwable($this)
&is_classes($this) and $this->can("as_string") and &like(scalar $this->new->as_string, qr/^$this/, "as_string matches")
&is_classes($this) and $this->can("as_string")
MC/DC0%0/2
$t->ok(&is_classes($this) && $this->can('as_string') && &like(scalar $this->new->as_string, qr/^$this/, 'as_string matches') && &is_throwable($this), "'${this}' is a classes::Exception class") || $t->diag(" '${this}' does not look like a classes::Exception class")
$t->ok(&is_classes($this) && $this->can('as_string') && &like(scalar $this->new->as_string, qr/^$this/, 'as_string matches') && &is_throwable($this), "'${this}' is a classes::Exception class")
$t->diag(" '${this}' does not look like a classes::Exception class")
MC/DC0%0/4
&is_classes($this) && $this->can('as_string') && &like(scalar $this->new->as_string, qr/^$this/, 'as_string matches') && &is_throwable($this)
&is_classes($this)
$this->can("as_string")
&like(scalar $this->new->as_string, qr/^$this/, "as_string matches")
&is_throwable($this)
Truth table33%1/3
A || B
A= $t->ok(&is_classes($this) && $this->can('as_string') && &like(scalar $this->new->as_string, qr/^$this/, 'as_string matches') && &is_throwable($this), "'${this}' is a classes::Exception class")B= $t->diag(" '${this}' does not look like a classes::Exception class")
Truth table20%1/5
A and B and C && D
A= &is_classes($this)B= $this->can("as_string")C= &like(scalar $this->new->as_string, qr/^$this/, "as_string matches")D= &is_throwable($this)
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 134 | is_classes($this) && | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 135 | $this->can('as_string') && | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 136 | like( $this->new->as_string, qr/^$this/, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 137 | 'as_string matches' ) && | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 138 | is_throwable($this), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 139 | "'$this' is a classes::Exception class" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 140 | ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 141 | || $t->diag(" '$this' does not look like a classes::Exception class"); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 142 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 143 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 144 | 5 | 1; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 145 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 146 | __END__ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||