List/Objects/WithUtils/Hash/Inflated.pm

filter: Statementstmt 96.7% 30 / 31 Branchbran 91.6% 11 / 12 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 88.8% 8 / 9 Podpod 0.0% 0 / 3 totaltotal 89.0% 49 / 55 SCAR 19.5
CC
7
Cov
95%
AUTOLOAD
4.0
can
3.0
__ANON__
2.1
CRAP 7.0
« List/Objects/WithUtils.pm ↑ Summary List/Objects/WithUtils/Hash/Inflated/RW.pm »
1 package List::Objects::WithUtils::Hash::Inflated;
2 2 $List::Objects::WithUtils::Hash::Inflated::VERSION = '2.028002';
3 2 ▶use strictures 2;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use Carp ();
Subroutine BEGIN: called CC=1 SCAR=0.0
5 2 ▶use Scalar::Util ();
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 sub new {
8 3 ▶ bless +{ @_[1 .. $#_] }, $_[0]
Subroutine new: called CC=1 SCAR=0.0
Pod undocumented
9 }
10  
11 1 ▶sub DEFLATE { %{ $_[0] } }
Subroutine DEFLATE: called CC=1 SCAR=0.0
Pod undocumented
12  
13 2 our $AUTOLOAD;
14  
15 sub can {
16 7 ▶ my ($self, $method) = @_;
Subroutine can: called CC=3 SCAR=11.0
Pod undocumented
17 7 ▶ if (my $sub = $self->SUPER::can($method)) {
Branch: 1 branch
BranchTrueFalseTotal
if (my $sub = $self->SUPER::can($method)) 1 6 7
18 1 return $sub
19 }
20 6 ▶ return unless exists $self->{$method};
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{$method} 5 1 6
21 sub {
22 1 ▶ my ($self) = @_;
Subroutine __ANON__: called CC=2 SCAR=7.4
23 1 ▶ if (my $sub = $self->SUPER::can($method)) {
Branch: 1 branch
BranchTrueFalseTotal
if (my $sub = $self->SUPER::can($method)) 0 1 1
24 0 goto $sub
25 }
26 1 $AUTOLOAD = $method;
27 1 goto &AUTOLOAD
28 }
29 1 }
30  
31 sub AUTOLOAD {
32 8 ▶ my $self = shift;
Subroutine AUTOLOAD: called CC=4 SCAR=13.9
33 8 ( my $method = $AUTOLOAD ) =~ s/.*:://;
34 8 ▶ Scalar::Util::blessed($self)
Branch: 1 branch
BranchTrueFalseTotal
builtin::blessed($self) or Carp::confess("Not a class method: '${method}'") 1 7 8
35 or Carp::confess "Not a class method: '$method'";
36
37 Carp::confess "Can't locate object method '$method'"
38 7 ▶ unless exists $self->{$method};
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{$method} 1 6 7
39 6 ▶ Carp::confess "Accessor '$method' is read-only"
Branch: 1 branch
BranchTrueFalseTotal
if @_ 1 5 6
40 if @_;
41  
42 5 $self->{$method}
43 }
44  
45 ▶sub DESTROY {}
Subroutine DESTROY: not called CC=1 SCAR=0.0
46  
47 2 1;
48  
49 =pod
50  
51 =for Pod::Coverage new can AUTOLOAD DEFLATE
52  
53 =cut
« List/Objects/WithUtils.pm ↑ Summary List/Objects/WithUtils/Hash/Inflated/RW.pm »