File Coverage

blib/lib/LittleORM/Db/Field.pm
Criterion Covered Total %
statement 9 16 56.2
branch 0 2 0.0
condition n/a
subroutine 3 4 75.0
pod 0 1 0.0
total 12 23 52.1


line stmt bran cond sub pod time code
1 1     1   3 use strict;
  1         1  
  1         24  
2              
3 1     1   348 use LittleORM::Db::Field::Default;
  1         2  
  1         20  
4 1     1   367 use LittleORM::Db::Field::XML;
  1         3  
  1         105  
5              
6             package LittleORM::Db::Field;
7              
8             sub by_type
9             {
10 0     0 0   my ( $self, $type ) = @_;
11              
12 0           $type = lc( $type );
13              
14 0           my $rv = undef;
15              
16 0 0         if( $type eq 'xml' )
17             {
18 0           $rv = LittleORM::Db::Field::XML -> new();
19             } else
20             {
21 0           $rv = LittleORM::Db::Field::Default -> new();
22             }
23              
24 0           return $rv;
25             }
26              
27             42;