Branch Coverage

blib/lib/DBIx/RunSQL.pm
Criterion Covered Total %
branch 15 84 17.8


line true false branch
107 0 0 unless ($dbh)
109 0 0 unless $dbh = "DBI"->connect($args{'dsn'}, $args{'user'}, $args{'password'}, $args{'options'})
116 0 0 wantarray ? :
199 0 0 unless ($args{'fh'})
201 0 0 unless open $args{'fh'}, "<:crlf", $args{'sql'}
282 0 0 unless ($args{'verbose_handler'})
290 0 0 if ($args{'fh'})
296 0 0 unless $statement =~ /^\s*[A-Z][A-Z]/imu
297 0 0 if $args{'verbose'}
300 0 0 if (not $sth) { }
301 0 0 if (not $args{'force'}) { }
308 0 0 if (not $status) { }
0 0 elsif (defined $sth->{'NUM_OF_FIELDS'} and 0 < $sth->{'NUM_OF_FIELDS'}) { }
309 0 0 if (not $args{'force'}) { }
316 0 0 if ($args{'output_bool'}) { }
0 0 elsif ($args{'output_string'}) { }
394 0 0 defined $_ ? :
401 0 0 unless ($options{'formatter'})
402 0 0 if (eval { do { require 'Text/Table.pm' } }) { }
419 0 0 if ($rotate)
430 0 0 if (@columns)
432 0 0 if ($no_header_when_empty and not @$res) { }
0 0 elsif ('tab' eq $options{'formatter'}) { }
438 0 0 $print_header ? :
444 0 0 unless ($class->can("table") or $class->can("new"))
452 0 0 if (not $class->isa('Text::Table') and my $table = $class->can('table')) { }
499 1 2 unless $_[1] =~ /\G\s*(\S.*?)(?:;[ \t]*\r?\n|\s*;?\s*\z)/gsu
508 3 0 if (not ref $_[0]) { }
0 0 elsif (ref $_[0] eq 'CODE') { }
0 0 elsif (ref $_[0] eq 'GLOB') { }
523 1 2 unless defined $statement
526 0 2 if ($statement =~ /^\s*CREATE\s+TRIGGER\b/iu)
527 0 0 if (not $statement =~ /END$/iu) { }
534 0 0 unless $trigger =~ /;$/u
535 0 0 if defined $next
566 1 3 unless ($argv)
568 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)) { }
586 2 2 if ($sql and not -f $sql)
590 2 0 unless ($sql or @$argv)
620 0 4 unless my $opts = $package->parse_command_line($appname, $argv)
622 0 4 if $opts->{'help'}
623 0 4 if $opts->{'man'}