Branch Coverage

blib/lib/Footprintless/Plugin/Database/PreparedStatementTemplate.pm
Criterion Covered Total %
branch 46 56 82.1


line true false branch
21 0 9 unless length $b <=> length $a
42 12 29 if (defined(my $key = $binding->{'key'})) { }
6 23 elsif (defined(my $reference = $binding->{'reference'})) { }
10 13 elsif (defined(my $code = $binding->{'code'})) { }
44 6 6 unless defined($binding->{'value'} = $context->{$key})
47 0 12 unless defined $binding->{'value'}
51 0 6 unless defined($binding->{'value'} = $$reference)
55 0 10 unless defined($binding->{'value'} = &$code())
61 50 78 if (not $key) { }
68 69 9 $text ? :
69 39 78 if $add_ix++
78 16 0 if (%{$self->{'bindings'};})
90 0 11 unless open my $fh, '>', \$sql_out
93 278 1026 if ($in_block_comment) { }
253 773 elsif ($in_line_comment) { }
94 11 267 if (substr($sql, $ix, 2) eq '*/')
100 10 243 if (substr($sql, $ix, 1) eq "\n")
107 11 762 if (not $in_quote and $char eq '/' and substr($sql, $ix + 1, 1) eq '*') { }
10 752 elsif (not $in_quote and $char eq '-' and substr($sql, $ix + 1, 1) eq '-') { }
116 10 742 if $char eq q[']
129 6 23 if (my $key = !$ref && $binding || $ref eq 'HASH' && $binding->{'key'}) { }
3 20 elsif (my $reference = $ref eq 'SCALAR' && $binding || $ref eq 'HASH' && $binding->{'reference'}) { }
15 5 elsif ($ref eq 'HASH' and defined $binding->{'value'}) { }
5 0 elsif (my $code = $ref eq 'CODE' && $binding || $ref eq 'HASH' && $binding->{'code'}) { }
135 0 3 unless ref $reference eq 'SCALAR'
142 0 15 if ref $binding->{'value'}
148 0 5 unless ref $code eq 'CODE'
163 28 13 if defined $binding->{'key'} or defined $binding->{'reference'} or defined $binding->{'code'}