Branch Coverage

blib/lib/ORLite.pm
Criterion Covered Total %
branch 159 206 77.1


line true false branch
21 0 1 unless -e $_
39 0 28 if (defined &Params::Util::_STRING($_[-1]) and $_[-1] eq "-DEBUG")
57 4 24 if (defined &Params::Util::_STRING($_[1])) { }
24 0 elsif (&Params::Util::_HASHLIKE($_[1])) { }
65 0 28 unless (defined &Params::Util::_STRING($params{'file'}) and $params{'create'} || -f $params{'file'})
75 26 2 unless (defined $params{'readonly'})
76 6 20 $params{'create'} ? :
78 0 28 unless (&Params::Util::_CLASS($params{'package'}))
85 2 26 if (defined $params{'cache'})
87 0 2 if ($params{'prune'})
90 0 2 unless ($params{'user_version'})
96 0 2 unless (${"${pkg}::VERSION";})
105 0 2 unless my $c = &Params::Util::_STRING(shift @queue)
119 4 24 if ($created)
121 0 4 unless (-d $dir)
123 0 0 if $params{'prune'}
125 0 4 if $params{'prune'}
134 6 22 $params{'create'} ? :
1 27 $params{'unicode'} ? :
138 2 26 if ($created and &Params::Util::_CODELIKE($params{'create'}))
144 0 27 if (exists $params{'user_version'} and $user_version != $params{'user_version'})
150 1 26 if ($cached and -f $cached)
158 2 24 $params{'readonly'} ? :
159 1 25 $params{'unicode'} ? :
160 1 25 $unicode ? :
270 24 2 unless $readonly
292 2 24 if ($cleanup) { }
317 23 3 if ($params{'tables'})
331 1 34 if ($t->{'class'} ne lc $t->{'class'})
354 4 31 if ($t->{'type'} eq "view")
367 43 39 if ($c->{'type'} =~ /INT/i) { }
16 23 elsif ($c->{'type'} =~ /(?:CHAR|CLOB|TEXT)/i) { }
2 21 elsif ($c->{'type'} =~ /BLOB/i or not $c->{'type'}) { }
1 20 elsif ($c->{'type'} =~ /(?:REAL|FLOA|DOUB)/i) { }
375 0 2 if ($unicode)
388 28 7 if ($t->{'pkn'} == 1)
390 27 1 if ($t->{'pk1'}{'affinity'} eq "INTEGER")
394 27 8 if ($t->{'pki'}) { }
4 4 elsif ($t->{'rowid'}) { }
396 3 24 if ($t->{'pki'}{'name'} eq $t->{'name'} . "_id")
417 31 4 if $t->{'rowid'}
418 1 34 if $readonly
421 15 20 if ($t->{'array'}) { }
448 37 45 $t->{'array'} ? :
457 27 8 if ($t->{'pki'}) { }
4 4 elsif ($t->{'rowid'}) { }
478 0 4 unless (/^(\w+).+?REFERENCES\s+(\w+)\s*\(\s*(\w+)/)
498 15 20 $t->{'array'} ? :
502 1 34 if ($params{'shim'}) { }
552 15 20 if ($t->{'array'}) { }
589 30 5 if ($t->{'pkn'})
590 10 20 if ($t->{'array'}) { }
624 30 5 if ($t->{'create'})
625 11 19 $t->{'array'} ? :
626 11 19 $t->{'array'} ? :
628 11 19 $t->{'array'} ? :
692 11 19 if ($t->{'create'} and $t->{'array'})
709 4 31 if ($params{'xsaccessor'}) { }
710 4 0 $t->{'create'} ? :
712 2 2 $t->{'array'} ? :
715 0 4 $t->{'id'} ? :
718 0 4 $t->{'id'} && $t->{'rowid'} ? :
730 23 0 if ($t->{'pki'} and $t->{'rowid'})
739 3 28 if ($t->{'id'})
768 23 3 if $params{'tables'}
771 4 22 if defined $params{'append'}
774 23 3 if ($tables)
787 1 25 if ($cached)
789 0 1 unless (-d $dir)
795 0 1 unless open FILE, ">$cached"
802 26 0 if ($^P and $^V >= 5.008009) { }
0 0 elsif ($DEBUG) { }
804 14 22 if $DBH
0 6 unless $DBH
0 2 unless $DBH
4 32 if ($DBH) { }
169 27 if @_
24 1 unless $DBH
26 9 if ref $_[0]
10 2 unless $self->{'col1'}
1 3 if @_
5 0 unless &$call()
4 18 unless &$call()
4 11 unless ($row)
11 3 if @_ > 2
0 8 if defined wantarray
0 0 unless $DBH
16 17 if ($DBH) { }
29 4 if @_
8 11 wantarray ? :
12 4 unless ($rows == 1)
0 1 if @_
0 0 if ref $_[0]
0 1 unless $self->{'col1'}
1 0 unless &$call()
1 0 unless ($row)
1 0 if @_
0 0 wantarray ? :
0 0 unless ($rows == 1)
0 1 if $DBH
1 0 if $DBH
805 0 26 if $@
810 0 0 if $@