Anonymous/Instance.pm

filter: Statementstmt 100% 16 / 16 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 85.7% 6 / 7 Podpod 0.0% 0 / 2 totaltotal 88.8% 24 / 27 CC 2 SCAR 2.2
CC
2
Cov
100%
AUTOLOAD
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« Anonymous.pm ↑ Summary
1 package Class::Anonymous::Instance;
2  
3 4 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 4 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 4 ▶use Carp ();
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 24 ▶sub AUTOLOAD {
Subroutine AUTOLOAD: called CC=2 SCAR=6.9
8 24 my $self = $_[0];
9 24 my ($name) = our $AUTOLOAD =~ /::(\w+)$/;
10 24 ▶ my $func = $self->($name) or Carp::croak "Instance of anonymous class has no method $name";
Branch: 1 branch
BranchTrueFalseTotal
my $func = &$self($name) or Carp::croak("Instance of anonymous class has no method $name") 23 1 24
11 23 goto $func;
12 }
13  
14 0 ▶sub DESTROY { }
Subroutine DESTROY: not called CC=1 SCAR=0.0
15  
16 2 ▶sub can { $_[0]->($_[1]) }
Subroutine can: called CC=1 SCAR=0.0
Pod undocumented
17  
18 20 ▶sub isa { goto $_[0]->('isa') }
Subroutine isa: called CC=1 SCAR=0.0
Pod undocumented
19  
20 4 1;
21  
« Anonymous.pm ↑ Summary