Branch Coverage

blib/lib/DBI/Fetch.pm
Criterion Covered Total %
branch 35 148 23.6


line true false branch
52 5 36 if ref $_[0]
54 18 0 if ref $_[0]
56 2 0 if ref $_[0]
67 0 0 @_ ? :
0 0 ref $_[0] ? :
68 0 0 defined &Carp::croak ? :
72 0 0 if @_ and 'DBI::Fetch' eq "$_[0]"
74 0 0 if (@_)
75 0 0 if (is_hash_ref($_[0])) { }
84 0 0 if ($key eq 'dbh' and not exists $config{'remember_last_used_dbh'})
85 0 0 $CONFIG[-1]{$key} ? :
95 0 0 if @_ and 'DBI::Fetch' eq "$_[0]"
97 0 0 @_ ? :
101 0 0 if @_ and 'DBI::Fetch' eq "$_[0]"
102 0 0 if @CONFIG > 1
103 0 0 @_ ? :
111 0 16 if @_ and 'DBI::Fetch' eq "$_[0]"
113 0 16 unless my $sql = shift()
121 5 11 if ($count) { }
127 8 3 if ($count) { }
132 3 0 if $count
136 3 13 wantarray ? :
144 0 10 if @_ and 'DBI::Fetch' eq "$_[0]"
146 0 10 unless my $sql = shift()
149 0 10 unless my $style = placeholder_disposition($sql)
155 6 4 if ($style eq ':name') { }
3 1 elsif ($style eq ':1') { }
156 2 4 if ($argc == 1 and is_hash_ref($_[0])) { }
2 2 elsif ($argc == 1 and is_array_ref($_[0])) { }
169 1 2 if ($argc == 1 and is_hash_ref($_[0])) { }
1 1 elsif ($argc == 1 and is_array_ref($_[0])) { }
180 0 1 if ($argc == 1 and is_array_ref($_[0])) { }
189 9 1 if (is_hash_ref($params))
191 6 12 unless (substr($k, 0, 1) eq ':')
205 0 18 if (is_array_ref($value))
206 0 0 unless ($#{$value;} == 1 and is_hash_ref($$value[1]))
218 0 18 if (is_array_ref($value)) { }
219 0 0 $#{$value;} == 1 && is_hash_ref($$value[1]) ? :
235 0 0 if @_ and 'DBI::Fetch' eq "$_[0]"
242 0 0 if (is_code_ref($args[0]))
246 0 0 if (my $class = blessed($args[0]))
247 0 0 if ($class->can('prepare'))
253 0 0 if ($dbh) { }
254 0 0 if $$config{'remember_last_used_dbh'}
260 0 0 unless $dbh
263 0 0 if (is_code_ref($args[0]))
267 0 0 if (my $class = blessed($args[0])) { }
268 0 0 if ($class->can('execute')) { }
280 0 0 if ($sth) { }
281 0 0 if ($$sth{'NUM_OF_PARAMS'})
285 0 0 if ($style eq ':name') { }
0 0 elsif ($style eq ':1') { }
290 0 0 exists $params{":$name"} ? :
0 0 exists $params{$name} ? :
293 0 0 if (is_array_ref($value)) { }
294 0 0 if ($#{$value;} == 1 and is_hash_ref($$value[1]))
306 0 0 if (is_array_ref($arg)) { }
307 0 0 if ($#{$arg;} == 1 and is_hash_ref($$arg[1]))
319 0 0 if (is_array_ref($arg)) { }
320 0 0 if ($#{$arg;} == 1 and is_hash_ref($$arg[1]))
334 0 0 unless $sql
338 0 0 if $@
340 0 0 if ($$sth{'NUM_OF_PARAMS'})
343 0 0 if (is_array_ref($arg)) { }
344 0 0 if ($#{$arg;} == 1 and is_hash_ref($$arg[1]))
357 0 0 if $@
361 0 0 if ($$sth{'NUM_OF_FIELDS'}) { }
368 0 0 if ($$config{'return_result_sets_as_ref'})
369 0 0 if ($$config{'auto_pop_config'})
370 0 0 @CONFIG > 1 ? :
383 0 0 if ($$config{'auto_pop_config'})
384 0 0 @CONFIG > 1 ? :
392 0 0 @results != 1 ? :
0 0 wantarray ? :