Poggy/Error.pm

filter: Statementstmt 66.6% 14 / 21 Branchbran n/a Conditioncond 0.0% 0 / 5 MC/DCmcdc 0.0% 0 / 3 Subroutinesub 60.0% 3 / 5 Podpod 0.0% 0 / 1 totaltotal 48.5% 17 / 35 CC 4 SCAR 23.5
CC
4
Cov
54%
new
20.0
__ANON__
1.0
BEGIN
1.0
CRAP 10.5
↑ Summary Poggy.pm »
1 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
3  
4 package DBIx::Poggy::Error;
5  
6 1 my @fields = qw(err errstr state);
7  
8 0 ▶sub new {
Subroutine new: not called CC=4 SCAR=30.0
Pod undocumented
9 0 my $proto = shift;
10 0 ▶ my $dbh = shift || 'DBI';
Condition0%0/2
shift() || 'DBI'
l!l
00
MC/DC0%0/1
shift() || 'DBI'
shift()
Truth table0%0/2
A
A= shift()
Aresult
11
00
11 0 ▶ my $self = bless {}, ref($proto) || $proto;
Condition0%0/3
ref $proto || $proto
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $proto || $proto
ref $proto $proto
Truth table0%0/3
A || B
A= ref $protoB= $proto
ABresult
1X1
011
000
12 0 foreach my $f ( @fields ) {
13 0 $self->{$f} = $dbh->$f();
14 }
15 0 return $self;
16 }
17  
18 1 foreach my $f ( @fields ) {
19 1 ▶ no strict 'refs';
Subroutine BEGIN: called CC=1 SCAR=0.0
20 0 ▶ *{$f} = sub { return $_[0]->{$f} };
Subroutine __ANON__: not called CC=1 SCAR=0.4
21 }
22  
23 1 1;
↑ Summary Poggy.pm »