Branch Coverage

blib/lib/DBIx/RunSQL.pm
Criterion Covered Total %
branch 13 70 18.5


line true false branch
100 0 0 unless ($dbh)
102 0 0 unless $dbh = 'DBI'->connect($args{'dsn'}, $args{'user'}, $args{'password'}, $args{'options'})
109 0 0 wantarray ? :
185 0 0 unless ($args{'fh'})
187 0 0 unless open $args{'fh'}, '<', $args{'sql'}
266 0 0 'ARRAY' eq ref $args{'sql'} ? :
279 0 0 unless $statement =~ /^\s*[A-Z][A-Z]/im
280 0 0 if $args{'verbose'}
283 0 0 if (not $sth) { }
284 0 0 if (not $args{'force'}) { }
291 0 0 if (not $status) { }
0 0 elsif (defined $sth->{'NUM_OF_FIELDS'} and 0 < $sth->{'NUM_OF_FIELDS'}) { }
292 0 0 if (not $args{'force'}) { }
299 0 0 if ($args{'output_bool'}) { }
0 0 elsif ($args{'output_string'}) { }
367 0 0 unless ($options{'formatter'})
368 0 0 if (eval { do { require 'Text/Table.pm' } }) { }
380 0 0 if (@columns)
382 0 0 if ($no_header_when_empty and not @$res) { }
0 0 elsif ('tab' eq $options{'formatter'}) { }
388 0 0 $print_header ? :
394 0 0 unless ($class->can('table') or $class->can('new'))
402 0 0 if (not $class->isa('Text::Table') and my $table = $class->can('table')) { }
451 1 2 unless $statement =~ /\S/
452 0 2 if ($statement =~ /^\s*CREATE\s+TRIGGER\b/i) { }
0 2 elsif ($trigger) { }
455 0 0 unless $statement =~ /END$/i
461 0 0 unless $statement =~ /END$/i
489 1 3 unless ($argv)
491 4 0 if (GetOptionsFromArray($argv, 'user:s', \my $user, 'password:s', \my $password, 'dsn:s', \my $dsn, 'verbose', \my $verbose, 'force|f', \my $force, 'sql:s', \my $sql, 'bool', \my $output_bool, 'string', \my $output_string, 'quiet', \my $no_header_when_empty, 'format:s', \my $formatter_class, 'help|h', \my $help, 'man', \my $man)) { }
507 2 2 if ($sql and not -f $sql)
511 2 0 unless ($sql or @$argv)
539 0 4 unless my $opts = $package->parse_command_line($appname, $argv)
541 0 4 if $opts->{'help'}
542 0 4 if $opts->{'man'}