Megaport/Internal/_Obj.pm

filter: Statementstmt 50.0% 10 / 20 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 37.5% 3 / 8 Podpod 0.0% 0 / 2 totaltotal 38.2% 13 / 34 CC 3 SCAR 11.6
CC
3
Cov
42%
AUTOLOAD
6.0
can
6.0
new
2.0
CRAP 3.2
« Megaport/Internal/_Result.pm ↑ Summary Megaport.pm »
1 package Megaport::Internal::_Obj;
2  
3 3 ▶use 5.10.0;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 3 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 3 our $AUTOLOAD;
8  
9 0 ▶sub new {
Subroutine new: not called CC=1 SCAR=6.9
Pod undocumented
10 0 my ($class, %hash) = @_;
11  
12 0 bless \%hash, $class;
13 }
14  
15 0 ▶sub AUTOLOAD {
Subroutine AUTOLOAD: not called CC=2 SCAR=17.9
16 0 my ($self) = @_;
17 0 my $command = $AUTOLOAD;
18 0 $command =~ s/.*://;
19  
20 0 ▶ if ($self->can($command)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->can($command)) 0 0 0
21 0 $self->{$command};
22 }
23 }
24  
25 0 ▶sub can {
Subroutine can: not called CC=2 SCAR=17.9
Pod undocumented
26 0 my ($self, $field) = @_;
27  
28 0 ▶ return sub {
Subroutine __ANON__: not called CC=1 SCAR=6.9
29 0 $self->{$field}
30 0 ▶ } if $self->{$field};
Branch: 1 branch
BranchTrueFalseTotal
if $self->{$field} 0 0 0
31 }
32  
33 0 ▶sub DESTROY { }
Subroutine DESTROY: not called CC=1 SCAR=0.0
34  
35 3 1;
36 __END__
« Megaport/Internal/_Result.pm ↑ Summary Megaport.pm »