| 1 | package Tangerine::hook::tests; | ||||||||||||||||||||||||||||||||||||||||||
| 2 | 16 | $Tangerine::hook::tests::VERSION = '0.23'; | |||||||||||||||||||||||||||||||||||||||||
| 3 | 16 | ▶ | use 5.010; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 4 | 16 | ▶ | use strict; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 5 | 16 | ▶ | use warnings; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 6 | 16 | ▶ | use parent 'Tangerine::Hook'; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 7 | 16 | ▶ | use Tangerine::Hook; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 8 | 16 | ▶ | use Tangerine::HookData; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 9 | 16 | ▶ | use Tangerine::Utils qw(any); | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 10 | |||||||||||||||||||||||||||||||||||||||||||
| 11 | 138 | ▶ | sub run { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
run: called CC=7 SCAR=19.5
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 12 | 138 | my ($self, $s) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 13 | 138 | ▶ | if ((any { $s->[0] eq $_ } qw(use no)) && scalar(@$s) > 1 && | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
Branch: 1 branch
Condition83%5/6
&any(sub {
$s->[0] eq $_;
}
, "use", "no") and scalar @$s > 1 and &any(sub {
$s->[1] eq $_;
}
, "Test::Inter", "Test::Modern", "Test::More", "Test::Strict")
&any(sub {
$s->[0] eq $_;
}
, "use", "no") and scalar @$s > 1
MC/DC66%2/3
&any(sub {
$s->[0] eq $_;
}
, "use", "no") and scalar @$s > 1 and &any(sub {
$s->[1] eq $_;
}
, "Test::Inter", "Test::Modern", "Test::More", "Test::Strict")
&any(sub {
$s->[0] eq $_;
}
, "use", "no")
scalar @$s > 1
&any(sub {
$s->[1] eq $_;
}
, "Test::Inter", "Test::Modern", "Test::More", "Test::Strict")
Truth table75%3/4
A and B and C
A= &any(sub {
$s->[0] eq $_;
}
, "use", "no")B= scalar @$s > 1C= &any(sub {
$s->[1] eq $_;
}
, "Test::Inter", "Test::Modern", "Test::More", "Test::Strict")
| |||||||||||||||||||||||||||||||||||||||||||
| 14 | 323 | ▶ | (any { $s->[1] eq $_ } | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 15 | qw(Test::Inter Test::Modern Test::More Test::Strict))) { | ||||||||||||||||||||||||||||||||||||||||||
| 16 | 1 | require Tangerine::hook::testloading; | |||||||||||||||||||||||||||||||||||||||||
| 17 | 1 | return Tangerine::HookData->new( hooks => [ | |||||||||||||||||||||||||||||||||||||||||
| 18 | Tangerine::hook::testloading->new(type => 'runtime') ] ); | ||||||||||||||||||||||||||||||||||||||||||
| 19 | } | ||||||||||||||||||||||||||||||||||||||||||
| 20 | 137 | ▶ | if ((any { $s->[0] eq $_ } qw(use no)) && scalar(@$s) > 1 && | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
Branch: 1 branch
Condition83%5/6
&any(sub {
$s->[0] eq $_;
}
, "use", "no") and scalar @$s > 1 and &any(sub {
$s->[1] eq $_;
}
, "Test::Needs", "Test::Requires")
&any(sub {
$s->[0] eq $_;
}
, "use", "no") and scalar @$s > 1
MC/DC66%2/3
&any(sub {
$s->[0] eq $_;
}
, "use", "no") and scalar @$s > 1 and &any(sub {
$s->[1] eq $_;
}
, "Test::Needs", "Test::Requires")
&any(sub {
$s->[0] eq $_;
}
, "use", "no")
scalar @$s > 1
&any(sub {
$s->[1] eq $_;
}
, "Test::Needs", "Test::Requires")
Truth table75%3/4
A and B and C
A= &any(sub {
$s->[0] eq $_;
}
, "use", "no")B= scalar @$s > 1C= &any(sub {
$s->[1] eq $_;
}
, "Test::Needs", "Test::Requires")
| |||||||||||||||||||||||||||||||||||||||||||
| 21 | 157 | ▶ | (any { $s->[1] eq $_ } qw(Test::Needs Test::Requires))) { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 22 | 6 | require Tangerine::hook::testrequires; | |||||||||||||||||||||||||||||||||||||||||
| 23 | 6 | return Tangerine::HookData->new( hooks => [ | |||||||||||||||||||||||||||||||||||||||||
| 24 | Tangerine::hook::testrequires->new(type => 'runtime') ] ); | ||||||||||||||||||||||||||||||||||||||||||
| 25 | } | ||||||||||||||||||||||||||||||||||||||||||
| 26 | 131 | return; | |||||||||||||||||||||||||||||||||||||||||
| 27 | } | ||||||||||||||||||||||||||||||||||||||||||
| 28 | |||||||||||||||||||||||||||||||||||||||||||
| 29 | 16 | 1; | |||||||||||||||||||||||||||||||||||||||||
| 30 | |||||||||||||||||||||||||||||||||||||||||||
| 31 | __END__ | ||||||||||||||||||||||||||||||||||||||||||