blib/lib/CURRENT.pm

filter: Statementstmt 53.8% 14 / 26 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 80.0% 4 / 5 Podpod n/a totaltotal 51.4% 18 / 35 CC 3 SCAR 14.3
CC
3
Cov
47%
AUTOLOAD
8.4
BEGIN
1.0
BEGIN
1.0
CRAP 4.2
↑ Summary
1 package CURRENT;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use vars qw( $VERSION );
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 1 $VERSION = '0.01';
8  
9 0 ▶sub AUTOLOAD {
Subroutine AUTOLOAD: not called CC=3 SCAR=21.3
10 0 my ($self) = @_;
11  
12 0 my $caller_class = caller;
13 0 my ($wanted_method) = $CURRENT::AUTOLOAD =~ m{.*::(.*)}g;
14  
15 0 my $object_method = $caller_class->can($wanted_method);
16 0 ▶ goto $object_method if $object_method;
Branch: 1 branch
BranchTrueFalseTotal
if $object_method 0 0 0
17  
18 0 ▶ if ( my $autoload = $caller_class->can('AUTOLOAD') ) {
Branch: 1 branch
BranchTrueFalseTotal
if (my $autoload = $caller_class->can("AUTOLOAD")) 0 0 0
19 0 require B;
20 0 my $autoload_class = B::svref_2object($autoload)->GV->STASH->NAME;
21  
22 1 ▶ no strict 'refs';
Subroutine BEGIN: called CC=1 SCAR=0.0
23 0 ${"${autoload_class}::AUTOLOAD"} = "${caller_class}::$wanted_method";
24  
25 0 goto $autoload;
26 }
27  
28 croak(
29 0 qq{Can't locate object method "$wanted_method"},
30 qq{ via package "$caller_class"},
31 );
32 }
33  
34 1 1;
35 __END__
↑ Summary