List/Objects/WithUtils/Hash/Inflated/RW.pm

filter: Statementstmt 100% 22 / 22 Branchbran 100% 8 / 8 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod n/a totaltotal 100% 35 / 35 SCAR 16.1
CC
5
Cov
100%
AUTOLOAD
5.0
BEGIN
1.0
BEGIN
1.0
CRAP 5.0
« List/Objects/WithUtils/Hash/Inflated.pm ↑ Summary List/Objects/WithUtils/Role/Hash/Immutable.pm »
1 package List::Objects::WithUtils::Hash::Inflated::RW;
2 1 $List::Objects::WithUtils::Hash::Inflated::RW::VERSION = '2.028002';
3 1 ▶use strictures 2;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use Carp ();
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use Scalar::Util ();
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 1 ▶use parent 'List::Objects::WithUtils::Hash::Inflated';
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 1 our $AUTOLOAD;
10 sub AUTOLOAD {
11 6 ▶ my $self = shift;
Subroutine AUTOLOAD: called CC=5 SCAR=16.1
12 6 ( my $method = $AUTOLOAD ) =~ s/.*:://;
13 6 ▶ Scalar::Util::blessed($self)
Branch: 1 branch
BranchTrueFalseTotal
builtin::blessed($self) or Carp::confess("Not a class method: '${method}'") 1 5 6
14 or Carp::confess "Not a class method: '$method'";
15  
16 Carp::confess "Can't locate object method '$method'"
17 5 ▶ unless exists $self->{$method};
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{$method} 1 4 5
18 4 ▶ return $self->{$method} unless @_;
Branch: 1 branch
BranchTrueFalseTotal
unless @_ 2 2 4
19 2 ▶ Carp::confess "Multiple arguments passed to setter '$method'"
Branch: 1 branch
BranchTrueFalseTotal
if @_ > 1 1 1 2
20 if @_ > 1;
21 1 $self->{$method} = $_[0]
22 }
23  
24 1 1;
25  
26 =pod
27  
28 =for Pod::Coverage AUTOLOAD
29  
30 =cut
« List/Objects/WithUtils/Hash/Inflated.pm ↑ Summary List/Objects/WithUtils/Role/Hash/Immutable.pm »