| 1 | package Tangerine::hook::moduleload; | ||||||||||||||||||||||||||||||||||||||||||
| 2 | 15 | $Tangerine::hook::moduleload::VERSION = '0.22'; | |||||||||||||||||||||||||||||||||||||||||
| 3 | 15 | ▶ | use strict; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 4 | 15 | ▶ | use warnings; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 5 | 15 | ▶ | use parent 'Tangerine::Hook'; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 6 | 15 | ▶ | use Tangerine::HookData; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 7 | 15 | ▶ | use Tangerine::Utils qw(any stripquotelike); | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||||||||||||||||||||
| 9 | sub run { | ||||||||||||||||||||||||||||||||||||||||||
| 10 | 144 | ▶ | my ($self, $s) = @_; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
run: called CC=7 SCAR=19.5
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 11 | 144 | my @routines = qw(load autoload load_remote autoload_remote); | |||||||||||||||||||||||||||||||||||||||||
| 12 | 144 | ▶ | 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 $s->[1] eq "Module::Load"
&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 $s->[1] eq "Module::Load"
&any(sub {
$s->[0] eq $_;
}
, "use", "no")
scalar @$s > 1
$s->[1] eq "Module::Load"
Truth table75%3/4
A and B and C
A= &any(sub {
$s->[0] eq $_;
}
, "use", "no")B= scalar @$s > 1C= $s->[1] eq "Module::Load"
| |||||||||||||||||||||||||||||||||||||||||||
| 13 | $s->[1] eq 'Module::Load') { | ||||||||||||||||||||||||||||||||||||||||||
| 14 | 2 | return Tangerine::HookData->new( hooks => [ | |||||||||||||||||||||||||||||||||||||||||
| 15 | Tangerine::hook::moduleload->new(type => 'runtime') ] ); | ||||||||||||||||||||||||||||||||||||||||||
| 16 | } | ||||||||||||||||||||||||||||||||||||||||||
| 17 | 142 | ▶ | if ($self->type eq 'runtime' && (any { $s->[0] eq $_ } @routines) && | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
Branch: 1 branch
Condition83%5/6
$self->type eq "runtime" and &any(sub {
$s->[0] eq $_;
}
, @routines) and scalar @$s > 2
$self->type eq "runtime" and &any(sub {
$s->[0] eq $_;
}
, @routines)
MC/DC66%2/3
$self->type eq "runtime" and &any(sub {
$s->[0] eq $_;
}
, @routines) and scalar @$s > 2
$self->type eq "runtime"
&any(sub {
$s->[0] eq $_;
}
, @routines)
scalar @$s > 2
Truth table75%3/4
A and B and C
A= $self->type eq "runtime"B= &any(sub {
$s->[0] eq $_;
}
, @routines)C= scalar @$s > 2
| |||||||||||||||||||||||||||||||||||||||||||
| 18 | scalar(@$s) > 2) | ||||||||||||||||||||||||||||||||||||||||||
| 19 | { | ||||||||||||||||||||||||||||||||||||||||||
| 20 | 5 | return Tangerine::HookData->new( | |||||||||||||||||||||||||||||||||||||||||
| 21 | children => [ 'use', stripquotelike($s->[1]), @$s[2..$#$s] ], | ||||||||||||||||||||||||||||||||||||||||||
| 22 | type => 'runtime', | ||||||||||||||||||||||||||||||||||||||||||
| 23 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 24 | } | ||||||||||||||||||||||||||||||||||||||||||
| 25 | 137 | return; | |||||||||||||||||||||||||||||||||||||||||
| 26 | } | ||||||||||||||||||||||||||||||||||||||||||
| 27 | |||||||||||||||||||||||||||||||||||||||||||
| 28 | 15 | 1; | |||||||||||||||||||||||||||||||||||||||||
| 29 | |||||||||||||||||||||||||||||||||||||||||||
| 30 | __END__ | ||||||||||||||||||||||||||||||||||||||||||