DB/Record.pm

filter: Statementstmt 54.5% 12 / 22 Branchbran 0.0% 0 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 50.0% 3 / 6 Podpod 100% 1 / 1 totaltotal 45.7% 16 / 35 CC 4 SCAR 17.5
CC
4
Cov
43%
get
12.0
AUTOLOAD
6.0
BEGIN
1.0
CRAP 5.8
« DB/Table.pm ↑ Summary
1 package Config::DB::Record;
2  
3 3 $Config::DB::Record::VERSION = '0.2';
4  
5 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 3 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 3 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 3 our $AUTOLOAD;
11  
12 0 ▶sub AUTOLOAD {
Subroutine AUTOLOAD: not called CC=2 SCAR=17.9
13 0 my ( $self, @pars ) = @_;
14 0 my $name = $AUTOLOAD;
15  
16 0 $name =~ s/.*://;
17  
18 0 ▶ croak "Can't locate object method \"$name\" via package \""
Branch: 1 branch
BranchTrueFalseTotal
unless $name =~ /^_/ 0 0 0
19 . __PACKAGE__ . '"'
20 unless $name =~ /^_/;
21  
22 0 $name =~ s/^_//;
23  
24 0 return $self->get( $name, @pars );
25 }
26  
27 0 ▶sub DESTROY {
Subroutine DESTROY: not called CC=1 SCAR=0.0
28 }
29  
30 0 ▶sub get {
Subroutine get: not called CC=3 SCAR=24.8
Pod documented
31 0 my ( $self, $field ) = @_;
32  
33 0 ▶ croak __PACKAGE__ . "::get: missing field parameter" unless defined $field;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $field 0 0 0
34 croak __PACKAGE__ . "::get: unknown field '$field' for configuration table"
35 0 ▶ unless exists $self->{$field};
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{$field} 0 0 0
36  
37 0 return $self->{$field};
38 }
39  
40 3 1;
41  
42 __END__
« DB/Table.pm ↑ Summary