| 1 | package Tangerine::hook::testloading; | ||||||||||||||||||||||||||||
| 2 | 2 | $Tangerine::hook::testloading::VERSION = '0.23'; | |||||||||||||||||||||||||||
| 3 | 2 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 4 | 2 | ▶ | use warnings; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 5 | 2 | ▶ | use parent 'Tangerine::Hook'; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 6 | 2 | ▶ | use Tangerine::HookData; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 7 | 2 | ▶ | use Tangerine::Occurence; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 8 | 2 | ▶ | use Tangerine::Utils qw(any stripquotelike); | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 9 | |||||||||||||||||||||||||||||
| 10 | 31 | ▶ | sub run { | ||||||||||||||||||||||||||
|
Subroutine
run: called CC=5 SCAR=16.1
Pod
documented
| |||||||||||||||||||||||||||||
| 11 | 31 | my ($self, $s) = @_; | |||||||||||||||||||||||||||
| 12 | 31 | ▶ | if (scalar(@$s) > 1 && any { $s->[0] eq $_ } qw/require_ok syntax_ok use_ok/) { | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
Branch: 1 branch
Condition100%3/3
scalar @$s > 1 and &any(sub {
$s->[0] eq $_;
}
, "require_ok", "syntax_ok", "use_ok")
MC/DC100%2/2
scalar @$s > 1 and &any(sub {
$s->[0] eq $_;
}
, "require_ok", "syntax_ok", "use_ok")
scalar @$s > 1
&any(sub {
$s->[0] eq $_;
}
, "require_ok", "syntax_ok", "use_ok")
Truth table100%3/3
A and B
A= scalar @$s > 1B= &any(sub {
$s->[0] eq $_;
}
, "require_ok", "syntax_ok", "use_ok")
| |||||||||||||||||||||||||||||
| 13 | 16 | ▶ | return if $s->[1] eq ';'; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 14 | 13 | my @modules = stripquotelike((@$s)[1..$#$s]); | |||||||||||||||||||||||||||
| 15 | 13 | ▶ | return Tangerine::HookData->new( | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 16 | children => [ | ||||||||||||||||||||||||||||
| 17 | ($s->[0] eq 'require_ok' ? | ||||||||||||||||||||||||||||
| 18 | ('require', $modules[0]) : | ||||||||||||||||||||||||||||
| 19 | ('use', @modules) | ||||||||||||||||||||||||||||
| 20 | ) | ||||||||||||||||||||||||||||
| 21 | |||||||||||||||||||||||||||||
| 22 | ], | ||||||||||||||||||||||||||||
| 23 | ); | ||||||||||||||||||||||||||||
| 24 | } | ||||||||||||||||||||||||||||
| 25 | 15 | return; | |||||||||||||||||||||||||||
| 26 | } | ||||||||||||||||||||||||||||
| 27 | |||||||||||||||||||||||||||||
| 28 | 2 | 1; | |||||||||||||||||||||||||||
| 29 | |||||||||||||||||||||||||||||
| 30 | __END__ | ||||||||||||||||||||||||||||