blib/lib/DBIO/Test/Schema/Encoded.pm

filter: Statementstmt 68.1% 15 / 22 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 60.0% 3 / 5 Podpod 100% 2 / 2 totaltotal 60.6% 20 / 33 CC 3 SCAR 13.5
CC
3
Cov
58%
set_column
6.0
new
6.0
BEGIN
1.0
CRAP 3.9
« blib/lib/DBIO/Exception/Server.pm ↑ Summary blib/lib/DBIO/AccessBroker/Static.pm »
1 package DBIO::Test::Schema::Encoded;
2 # ABSTRACT: Test result class for the encoded table
3  
4 256 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 256 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 256 our $VERSION = '0.900007';
8  
9 256 ▶use base qw/DBIO::Test::BaseResult/;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 256 __PACKAGE__->table('encoded');
12 256 __PACKAGE__->add_columns(
13 'id' => {
14 data_type => 'integer',
15 is_auto_increment => 1
16 },
17 'encoded' => {
18 data_type => 'varchar',
19 size => 100,
20 is_nullable => 1,
21 },
22 );
23  
24 256 __PACKAGE__->set_primary_key('id');
25  
26 256 __PACKAGE__->has_many (keyholders => 'DBIO::Test::Schema::Employee', 'encoded');
27  
28 0 ▶sub set_column {
Subroutine set_column: not called CC=2 SCAR=17.9
Pod documented
29 0 my ($self, $col, $value) = @_;
30 0 ▶ if( $col eq 'encoded' ){
Branch: 1 branch
BranchTrueFalseTotal
if ($col eq "encoded") 0 0 0
31 0 $value = reverse split '', $value;
32 }
33 0 $self->next::method($col, $value);
34 }
35  
36 0 ▶sub new {
Subroutine new: not called CC=2 SCAR=17.9
Pod documented
37 0 my($self, $attr, @rest) = @_;
38 $attr->{encoded} = reverse split '', $attr->{encoded}
39 0 ▶ if defined $attr->{encoded};
Branch: 1 branch
BranchTrueFalseTotal
if defined $attr->{"encoded"} 0 0 0
40 0 return $self->next::method($attr, @rest);
41 }
42  
43 256 1;
44  
45 __END__
« blib/lib/DBIO/Exception/Server.pm ↑ Summary blib/lib/DBIO/AccessBroker/Static.pm »