blib/lib/Async/Redis/Error.pm

filter: Statementstmt 100% 21 / 21 Branchbran 50.0% 1 / 2 Conditioncond 50.0% 1 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 100% 9 / 9 Podpod 0.0% 0 / 4 totaltotal 82.0% 32 / 39 CC 3 SCAR 3.2
CC
3
Cov
92%
stringify
2.1
throw
2.0
BEGIN
1.0
CRAP 1.4
« script/generate-commands ↑ Summary blib/lib/Async/Redis/Error/Connection.pm »
1 package Async::Redis::Error;
2  
3 92 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 92 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 92 ▶use 5.018;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 use overload
8 92 ▶ '""' => 'stringify',
Subroutine BEGIN: called CC=1 SCAR=0.0
9 219 ▶ bool => sub { 1 },
Subroutine __ANON__: called CC=1 SCAR=0.0
10 92 fallback => 1;
11  
12 119 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
Pod undocumented
13 119 my ($class, %args) = @_;
14 119 return bless \%args, $class;
15 }
16  
17 96 ▶sub message { shift->{message} }
Subroutine message: called CC=1 SCAR=0.0
Pod undocumented
18  
19 93 ▶sub stringify {
Subroutine stringify: called CC=2 SCAR=7.2
Pod undocumented
20 93 my ($self) = @_;
21 93 ▶ return $self->message // ref($self) . ' error';
Condition50%1/2
$self->message // ref($self) . ' error'
l!l
930
MC/DC0%0/1
$self->message // ref($self) . ' error'
$self->message
Truth table50%1/2
A
A= $self->message
Aresult
11
00
22 }
23  
24 1 ▶sub throw {
Subroutine throw: called CC=2 SCAR=7.1
Pod undocumented
25 1 my $self = shift;
26 1 ▶ $self = $self->new(@_) unless ref $self;
Branch: 1 branch
BranchTrueFalseTotal
unless ref $self 1 0 1
27 1 die $self;
28 }
29  
30 92 1;
31  
32 __END__
« script/generate-commands ↑ Summary blib/lib/Async/Redis/Error/Connection.pm »