Branch Coverage

blib/lib/Tree/Numbered/Tools.pm
Criterion Covered Total %
branch 72 158 45.5


line true false branch
229 0 32 unless my $filename = $args{'filename'}
233 0 32 unless open FH, "<$filename"
251 32 0 if ($use_column_names) { }
297 704 32 $i > 0 ? :
300 224 512 if ($current_indent > $previous_indent) { }
144 368 elsif ($current_indent < $previous_indent) { }
317 16 128 unless (defined $level_indent{$current_indent})
320 16 0 $i ? :
332 736 0 if ($use_column_names) { }
388 0 49 unless my $arrayref = $args{'arrayref'}
396 0 49 if @first_element < 3
401 48 1 if ($use_column_names) { }
415 0 49 if $column_names[0] ne 'serial'
432 0 451 unless _isInteger($serial)
433 0 451 unless _isInteger($parent)
481 402 3393 if $_ == $parent
495 49 0 if @column_names
496 49 0 if @column_names
545 0 0 unless my $dbh = $args{'dbh'}
546 0 0 unless my $sql = $args{'sql'}
553 0 0 unless my $sth = $dbh->prepare($sql)
554 0 0 unless $sth->execute
557 0 0 unless my $arrayref = $sth->fetchall_arrayref
600 0 0 unless my $dbh = $args{'dbh'}
601 0 0 unless my $table = $args{'table'}
656 0 20 unless $column_names_ref
690 0 215 if $first_value =~ /\s+/
693 67 148 if $first_column_string_length > $column_pos[0]
700 215 0 if ($value)
701 215 0 $value ? :
703 0 215 if $value =~ /\s+/
704 66 149 if $column_string_length > $column_pos[$i]
725 215 0 if ($column_value)
727 0 215 if $column_value =~ /\s+/
741 20 20 if ($i == 0) { }
759 20 0 if $method
797 0 15 unless ($column_names_ref)
819 0 602 unless $value
846 15 0 if $method
906 0 60 unless my $table = $args{'table'}
918 30 30 if $comments1
920 30 30 if $comments2
922 30 30 if $sql_header
924 60 0 if $drop_table
926 60 0 if $create_table
928 60 0 if $insert_into
930 30 30 if $create_index
970 0 0 unless my $dbh = $args{'dbh'}
971 0 0 unless my $table = $args{'table'}
987 0 0 if ($sql)
988 0 0 unless $dbh->do($sql)
992 0 0 if ($drop)
995 0 0 if ($sql)
996 0 0 unless $dbh->do($sql)
1001 0 0 if ($sql)
1002 0 0 unless $dbh->do($sql)
1007 0 0 if ($sql)
1008 0 0 unless $dbh->do($sql)
1014 0 0 if ($sql)
1015 0 0 unless $dbh->do($sql)
1339 6 95 wantarray ? :
1390 0 0 if scalar @columns > $max_cols
1402 0 768 wantarray ? :
1414 736 0 wantarray ? :
1426 902 0 $string =~ /^[+-]?\d+$/ ? :
1472 0 0 if (uc $words[$i] eq 'AS')
1474 0 0 if ($words[$i + 1])
1476 0 0 if ($words[$i + 1] =~ /\,$/) { }
1504 0 60 unless my $table = $args{'table'}
1521 0 60 unless ($column_names_ref)
1549 30 30 if (/^mysql$/i)
1579 30 0 if (/^postgres$|^PostgreSQL$|^pgsql$|^pg$/i)
1626 0 60 unless $drop
1628 0 60 unless $drop
1668 90 30 if $i < @column_names_sql - 1 or lc $dbs eq 'mysql'
1701 0 1704 unless $value
1708 852 852 if $i < @column_names - 1
1723 60 0 if $method
1725 60 0 $drop ? :