Branch Coverage

blib/lib/DBIx/RunSQL.pm
Criterion Covered Total %
branch 13 74 17.5


line true false branch
104 0 0 unless ($dbh)
106 0 0 unless $dbh = "DBI"->connect($args{'dsn'}, $args{'user'}, $args{'password'}, $args{'options'})
113 0 0 wantarray ? :
197 0 0 unless ($args{'fh'})
199 0 0 unless open $args{'fh'}, "<", $args{'sql'}
286 0 0 'ARRAY' eq ref $args{'sql'} ? :
299 0 0 unless $statement =~ /^\s*[A-Z][A-Z]/im
300 0 0 if $args{'verbose'}
303 0 0 if (not $sth) { }
304 0 0 if (not $args{'force'}) { }
311 0 0 if (not $status) { }
0 0 elsif (defined $sth->{'NUM_OF_FIELDS'} and 0 < $sth->{'NUM_OF_FIELDS'}) { }
312 0 0 if (not $args{'force'}) { }
319 0 0 if ($args{'output_bool'}) { }
0 0 elsif ($args{'output_string'}) { }
397 0 0 defined $_ ? :
404 0 0 unless ($options{'formatter'})
405 0 0 if (eval { do { require 'Text/Table.pm' } }) { }
422 0 0 if ($rotate)
433 0 0 if (@columns)
435 0 0 if ($no_header_when_empty and not @$res) { }
0 0 elsif ('tab' eq $options{'formatter'}) { }
441 0 0 $print_header ? :
447 0 0 unless ($class->can("table") or $class->can("new"))
455 0 0 if (not $class->isa('Text::Table') and my $table = $class->can('table')) { }
504 1 2 unless $statement =~ /\S/
505 0 2 if ($statement =~ /^\s*CREATE\s+TRIGGER\b/i) { }
0 2 elsif ($trigger) { }
508 0 0 unless $statement =~ /END$/i
514 0 0 unless $statement =~ /END$/i
542 1 3 unless ($argv)
544 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, 'rotate', \my $rotate, 'null=s', \my $nullstr, 'help|h', \my $help, 'man', \my $man)) { }
562 2 2 if ($sql and not -f $sql)
566 2 0 unless ($sql or @$argv)
596 0 4 unless my $opts = $package->parse_command_line($appname, $argv)
598 0 4 if $opts->{'help'}
599 0 4 if $opts->{'man'}