Moose/Forgiving.pm

filter: Statementstmt 96.6% 29 / 30 Branchbran 87.5% 7 / 8 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod n/a totaltotal 95.4% 42 / 44 CC 6 SCAR 13.2
CC
6
Cov
95%
__ANON__
6.0
BEGIN
1.0
BEGIN
1.0
CRAP 3.7
« Moose/FallbackSlot.pm ↑ Summary Moose/FallbackHash.pm »
1 2 ▶use 5.008;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 package Tie::Moose::Forgiving;
6  
7 2 our $AUTHORITY = 'cpan:TOBYINK';
8 2 our $VERSION = '0.003';
9  
10 2 ▶use Moose::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 2 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 override fallback => sub
14 4 ▶{
Subroutine __ANON__: called CC=6 SCAR=18.0
15 4 my $self = shift;
16 4 my ($operation, $key, $value) = @_;
17
18 4 for ($operation)
19 {
20 4 ▶ if ($_ eq "FETCH") { return; }
Branch: 1 branch
BranchTrueFalseTotal
if ($_ eq "FETCH") 1 3 4
21 3 ▶ if ($_ eq "STORE") { super; }
Branch: 1 branch
BranchTrueFalseTotal
if ($_ eq "STORE") 1 2 3
22 2 ▶ if ($_ eq "EXISTS") { return; }
Branch: 1 branch
BranchTrueFalseTotal
if ($_ eq "EXISTS") 1 1 2
23 1 ▶ if ($_ eq "DELETE") { return; }
Branch: 1 branch
BranchTrueFalseTotal
if ($_ eq "DELETE") 1 0 1
24
25 0 confess "This should never happen!";
26 }
27 2 };
28  
29 2 1;
30  
31 __END__
« Moose/FallbackSlot.pm ↑ Summary Moose/FallbackHash.pm »