blib/lib/Thunderhorse/Autoloadable.pm

filter: Statementstmt 100% 18 / 18 Branchbran 100% 6 / 6 Conditioncond 100% 3 / 3 MC/DCmcdc 100% 2 / 2 Subroutinesub 100% 4 / 4 Podpod 0.0% 0 / 1 totaltotal 97.0% 33 / 34 CC 5 SCAR 9.2
CC
5
Cov
100%
AUTOLOAD
3.0
can
3.0
BEGIN
1.0
CRAP 2.5
« blib/lib/Thunderhorse/Context.pm ↑ Summary blib/lib/Gears/Logger/Handler.pm »
1 package Thunderhorse::Autoloadable;
2 24 $Thunderhorse::Autoloadable::VERSION = '0.107';
3 24 ▶use v5.40;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 24 ▶use Mooish::Base -standard, -role;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 24 requires qw(
7 _run_method
8 _can_method
9 );
10  
11 159 ▶sub AUTOLOAD ($self, @args)
Subroutine AUTOLOAD: called CC=3 SCAR=11.0
12 {
13 159 our $AUTOLOAD;
14  
15 159 state %methods;
16 159 ▶ my $method = $methods{$AUTOLOAD} //= do {
Condition100%3/3
$methods{$Thunderhorse::Autoloadable::AUTOLOAD} //= do { my $wanted = $Thunderhorse::Autoloadable::AUTOLOAD =~ s/^(.+):://ru; return if $wanted eq "DESTROY"; $wanted }
l!l&&r!l&&!r
475260
MC/DC100%2/2
$methods{$Thunderhorse::Autoloadable::AUTOLOAD} //= do { my $wanted = $Thunderhorse::Autoloadable::AUTOLOAD =~ s/^(.+):://ru; return if $wanted eq "DESTROY"; $wanted }
$methods{$Thunderhorse::Autoloadable::AUTOLOAD} do { my $wanted = $Thunderhorse::Autoloadable::AUTOLOAD =~ s/^(.+):://ru; return if $wanted eq "DESTROY"; $wanted }
Truth table100%3/3
A //= B
A= $methods{$Thunderhorse::Autoloadable::AUTOLOAD}B= do { my $wanted = $Thunderhorse::Autoloadable::AUTOLOAD =~ s/^(.+):://ru; return if $wanted eq "DESTROY"; $wanted }
ABresult
1X1
011
000
17 112 my $wanted = $AUTOLOAD =~ s{^(.+)::}{}r;
18 112 ▶ return if $wanted eq 'DESTROY';
Branch: 1 branch
BranchTrueFalseTotal
if $wanted eq "DESTROY" 95 17 112
19 17 $wanted;
20 };
21  
22 64 $self->_run_method($method, @args);
23 }
24  
25 733 ▶sub can ($self, $method)
Subroutine can: called CC=3 SCAR=11.0
Pod undocumented
26 {
27 733 my $I_can = $self->SUPER::can($method);
28 733 ▶ return $I_can if $I_can;
Branch: 1 branch
BranchTrueFalseTotal
if $I_can 547 186 733
29  
30 186 ▶ return undef unless ref $self;
Branch: 1 branch
BranchTrueFalseTotal
unless ref $self 117 69 186
31 69 return $self->_can_method($method);
32 }
33  
« blib/lib/Thunderhorse/Context.pm ↑ Summary blib/lib/Gears/Logger/Handler.pm »