| 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'
MC/DC0%0/1
shift() || 'DBI'
shift()
Truth table0%0/2
A
A= shift()
| |||||||||||||||||||||
| 11 | 0 | ▶ | my $self = bless {}, ref($proto) || $proto; | ||||||||||||||||||
|
Condition0%0/3
ref $proto || $proto
MC/DC0%0/2
ref $proto || $proto
ref $proto
$proto
Truth table0%0/3
A || B
A= ref $protoB= $proto
| |||||||||||||||||||||
| 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; | |||||||||||||||||||