Branch Coverage

blib/lib/Test/MockDBI/St.pm
Criterion Covered Total %
branch 84 96 87.5


line true false branch
23 5 23 if ($status)
26 1 4 if (ref $retval eq 'CODE')
32 5 18 if $mockdbi->_is_bad_bind_param($$self{'Statement'}, $bind_value)
35 0 18 unless ($p_num =~ /^\d+$/)
39 2 16 if ($p_num < 1 or $p_num > $$self{'NUM_OF_PARAMS'})
48 1 15 if ($attr and $attr =~ /^\d+$/) { }
1 14 elsif ($attr) { }
53 0 1 if (not $$attr{'TYPE'} =~ /^\d+$/) { }
75 3 9 if ($status)
78 1 2 if (ref $retval eq 'CODE')
84 0 9 if $mockdbi->_is_bad_bind_param($$self{'Statement'}, $bind_value)
86 1 8 if (not $self && $p_num && $bind_value or $max_length)
93 1 7 unless ($p_num =~ /^\d+$/)
97 1 6 if ($p_num < 1 or $p_num > $$self{'NUM_OF_PARAMS'})
103 0 6 if ($attr and $attr =~ /^\d+$/) { }
0 6 elsif ($attr) { }
108 0 0 if (not $$attr{'TYPE'} =~ /^\d+$/) { }
119 1 5 if (ref $bind_value ne 'SCALAR')
138 5 52 if ($status)
141 1 4 if (ref $retval eq 'CODE')
162 13 39 if $$self{'Statement'} =~ /^select/i
167 2 50 if (ref $$self{'_fake'}{'InoutParams'} eq 'ARRAY' and scalar @{$$self{'_fake'}{'InoutParams'};} > 0)
170 3 0 if $status
176 3 49 if ($$self{'NUM_OF_PARAMS'} != scalar keys %{$$self{'ParamValues'};})
190 15 44 unless $$self{'Executed'}
193 31 13 if ($status)
196 6 25 if (ref $retval eq 'CODE')
198 3 3 if ($caller[3] and $caller[3] =~ /fetchrow_array$/)
206 17 21 if (ref $retval ne 'ARRAY')
211 18 3 if (scalar @{$retval;} > 0)
213 0 18 if (ref $row ne 'ARRAY')
230 13 7 unless $row
231 4 3 if ref $row eq 'ARRAY'
232 3 0 if ref $row eq 'CODE'
242 0 24 unless $$self{'Executed'}
245 23 1 if ($status)
248 8 15 if (ref $retval eq 'CODE')
254 3 13 if (ref $retval ne 'ARRAY')
259 10 3 if (scalar @{$retval;} > 0)
261 0 10 if (ref $row ne 'HASH')
278 4 7 unless $$self{'Executed'}
281 5 2 if ($status)
284 1 4 if (ref $retval eq 'CODE')
290 4 2 if (ref $retval ne 'ARRAY')
305 5 45 if ($status)
308 1 4 if (ref $retval eq 'CODE')
327 10 2 if ($status)
330 2 8 if (ref $retval eq 'CODE')