Branch Coverage

blib/lib/DBIx/FileSystem.pm
Criterion Covered Total %
branch 15 640 2.3


line true false branch
153 0 0 if (defined $customcmds)
155 0 0 if (defined $commands{$cucmd})
158 0 0 unless (defined $$customcmds{$cucmd}{'func'})
161 0 0 unless (defined $$customcmds{$cucmd}{'doc'})
169 0 0 unless $DBIx::FileSystem::dbh = 'DBI'->connect($DBCONN, $DBUSER, $DBPWD, {'ChopBlanks', 1, 'AutoCommit', 1, 'PrintError', 0})
174 0 0 if (check_vdirs_struct)
175 0 0 unless $DBIx::FileSystem::dbh->disconnect
180 0 0 if (check_db_tables)
181 0 0 unless $DBIx::FileSystem::dbh->disconnect
204 0 0 unless defined $cmd
207 0 0 if (defined $command) { }
208 0 0 if &{$$command{'func'};}(@arg)
214 0 0 unless $DBIx::FileSystem::dbh->disconnect
224 0 0 unless $DBIx::FileSystem::dbh = 'DBI'->connect($DBCONN, $DBUSER, $DBPWD, {'ChopBlanks', 1, 'AutoCommit', 1, 'PrintError', 0})
229 0 0 if (check_vdirs_struct)
235 0 0 unless $DBIx::FileSystem::dbh->disconnect
249 0 0 if (defined $arg) { }
250 0 0 if (defined $commands{$arg}) { }
271 0 0 if (defined $x)
282 0 0 if (length $DBIx::FileSystem::vwd)
286 0 0 unless ($st)
290 0 0 unless ($st->execute)
308 0 0 if $i <= $#files
323 0 0 if (defined $x)
337 0 0 if (length $i > $maxlen)
358 0 0 if (defined $x)
364 0 0 if (defined $$vdirs{$DBIx::FileSystem::vwd}{'comcol'}) { }
369 0 0 unless ($st)
373 0 0 unless ($st->execute)
378 0 0 unless defined $c
387 0 0 unless ($st)
391 0 0 unless ($st->execute)
405 0 0 if (length $i > $maxlen)
419 0 0 if (defined $arg and not defined $x) { }
420 0 0 if (exists $$vdirs{$arg}) { }
454 0 0 if (defined $arg and not defined $x) { }
455 0 0 if ($$vdirs{$DBIx::FileSystem::vwd}{'edit'}) { }
456 0 0 if ($$vdirs{$DBIx::FileSystem::vwd}{'defaultfile'} and $$vdirs{$DBIx::FileSystem::vwd}{'defaultfile'} eq $arg) { }
460 0 0 if ($#reffiles == -1) { }
462 0 0 if (exists $$vdirs{$DBIx::FileSystem::vwd}{'rmcheck'})
465 0 0 if (defined $rmerr) { }
470 0 0 if (not defined $r) { }
0 0 elsif ($r == 0) { }
498 0 0 if (defined $old and defined $new and not defined $x) { }
499 0 0 if ($$vdirs{$DBIx::FileSystem::vwd}{'edit'}) { }
501 0 0 if (length $new <= $$vdirs{$DBIx::FileSystem::vwd}{'cols'}{$fnc}{'len'} and not $new =~ /\W+/) { }
508 0 0 if ($col eq $fnc) { }
0 0 elsif (exists $$vdirs{$DBIx::FileSystem::vwd}{'cols'}{$col}{'uniq'}) { }
521 0 0 if (not defined $r or $r != 1)
542 0 0 if (defined $arg and not defined $x) { }
543 0 0 if (&print_file($DBIx::FileSystem::OUT, $arg, 0) == 1)
558 0 0 if (defined $arg and not defined $x) { }
559 0 0 if (&print_file($DBIx::FileSystem::OUT, $arg, 1) == 1)
581 0 0 if (defined $arg and not defined $x) { }
582 0 0 if ($$vdirs{$DBIx::FileSystem::vwd}{'edit'}) { }
584 0 0 if (length $arg <= $$vdirs{$DBIx::FileSystem::vwd}{'cols'}{$fnc}{'len'} and not $arg =~ /\W+/) { }
586 0 0 if sysopen FN, $tmpf, 194
590 0 0 if ($r == 0 or $r == 1) { }
594 0 0 if (defined $err)
596 0 0 if $inp eq 'y'
597 0 0 if $inp eq 'n'
600 0 0 if (length $sql and $tmpf_mtime != (stat $tmpf)[9]) { }
602 0 0 if (not defined $res) { }
0 0 elsif ($res == 0) { }
604 0 0 if ($inp eq 'y')
634 0 0 if (defined $arg and not defined $x) { }
636 0 0 if ($#reffiles > -1) { }
653 0 0 if (defined $arg and not defined $x) { }
685 0 0 if ($start == 0) { }
0 0 elsif ($line =~ /^cd\s.*/) { }
719 0 0 unless ($state)
728 0 0 if $name[$list_index - 1] =~ /^$text/
753 0 0 unless ($state)
761 0 0 if $name[$list_index - 1] =~ /^$text/
783 0 0 unless ($state)
789 0 0 unless ($st)
793 0 0 unless ($st->execute)
807 0 0 if $name[$list_index - 1] =~ /^$text/
832 0 0 unless defined $DBIx::FileSystem::vwd
834 0 0 unless (defined $$vdirs{$dir}{'desc'})
838 0 0 unless (defined $$vdirs{$dir}{'edit'})
843 0 0 unless (defined $$vdirs{$dir}{'cols'})
848 0 0 unless (defined $$vdirs{$dir}{'refby'})
854 0 0 unless (defined $fnamcol)
858 0 0 unless (defined $$vdirs{$dir}{'cols'}{$fnamcol})
862 0 0 if ($$vdirs{$dir}{'cols'}{$fnamcol}{'type'} ne 'char')
866 0 0 if ($$vdirs{$dir}{'edit'} == 1)
867 0 0 unless (defined $$vdirs{$dir}{'cols'}{$fnamcol}{'len'})
872 0 0 if ($$vdirs{$dir}{'cols'}{$fnamcol}{'len'} + 2 > $LS_COL_WIDTH)
879 0 0 if (defined $comcol)
880 0 0 unless (defined $$vdirs{$dir}{'cols'}{$comcol})
884 0 0 if ($$vdirs{$dir}{'cols'}{$comcol}{'type'} ne 'char')
888 0 0 unless (defined $$vdirs{$dir}{'cols'}{$comcol}{'len'})
898 0 0 if (exists $$cols{$col}{'delcp'})
904 0 0 unless (defined $$cols{$col}{'type'} or defined $$cols{$col}{'ref'})
908 0 0 if (defined $$cols{$col}{'ref'} and not defined $$vdirs{$$cols{$col}{'ref'}})
914 0 0 if (exists $$cols{$col}{'flags'})
915 0 0 if ($$cols{$col}{'type'} ne 'int')
919 0 0 unless (ref $$cols{$col}{'flags'} eq 'HASH')
924 0 0 if ($i =~ /\D/)
928 0 0 unless (ref $$cols{$col}{'flags'}{$i} eq 'ARRAY')
932 0 0 unless (defined $$cols{$col}{'flags'}{$i}[0])
936 0 0 if ($$cols{$col}{'flags'}{$i}[0] =~ / /)
940 0 0 unless (defined $$cols{$col}{'flags'}{$i}[1])
948 0 0 if (exists $$cols{$col}{'enums'})
949 0 0 if ($$cols{$col}{'type'} ne 'int')
953 0 0 unless (ref $$cols{$col}{'enums'} eq 'HASH')
958 0 0 if ($i =~ /\D/)
962 0 0 unless (ref $$cols{$col}{'enums'}{$i} eq 'ARRAY')
966 0 0 unless (defined $$cols{$col}{'enums'}{$i}[0])
970 0 0 if ($$cols{$col}{'enums'}{$i}[0] =~ / /)
974 0 0 unless (defined $$cols{$col}{'enums'}{$i}[1])
982 0 0 if (defined $$cols{$col}{'ref'})
986 0 0 if (defined $$cols{$col}{'type'} and $$vdirs{$dir}{'edit'} == 1)
987 0 0 if ($$cols{$col}{'type'} ne 'char' and $$cols{$col}{'type'} ne 'int' and $$cols{$col}{'type'} ne 'smallint' and $$cols{$col}{'type'} ne 'inet' and $$cols{$col}{'type'} ne 'cidr')
998 0 0 unless (defined $$cols{$col}{'var'})
1002 0 0 unless (defined $$cols{$col}{'desc'})
1006 0 0 unless (defined $$cols{$col}{'pos'})
1013 0 0 if (defined $varnames{$varname})
1032 0 0 unless ($st)
1036 0 0 unless ($st->execute)
1042 0 0 unless ($dbversion)
1048 0 0 if ($VERSION ne $dbversion)
1057 0 0 unless ($st)
1061 0 0 unless ($st->execute)
1082 0 0 unless ($r)
1088 0 0 unless ($r)
1099 0 0 if (defined $$cols{$col}{'ref'}) { }
1102 0 0 if (defined $$vdirs{$rdir}{'cols'}{$rfnc}{'len'}) { }
1108 0 0 if (defined $$cols{$col}{'len'}) { }
1113 0 0 if defined $$cols{$col}{'colopt'}
1120 0 0 unless ($r)
1124 0 0 if exists $$vdirs{$tab}{'defaultfile'}
1125 0 0 if ($df)
1127 0 0 if (length $df <= $$vdirs{$tab}{'cols'}{$fnc}{'len'} and not $df =~ /\W+/) { }
1129 0 0 if (not defined $r or $r == 0)
1180 0 0 if $col eq $fnc
1182 0 0 if (length $var > $maxvarlen)
1186 0 0 exists $$cols{$col}{'ref'} ? :
1187 0 0 exists $$cols{$col}{'flags'} ? :
1188 0 0 exists $$cols{$col}{'enums'} ? :
1197 0 0 unless ($st)
1201 0 0 unless ($st->execute($fnam))
1208 0 0 if ($$vdirs{$DBIx::FileSystem::vwd}{'defaultfile'} and $$vdirs{$DBIx::FileSystem::vwd}{'defaultfile'} ne $fnam)
1209 0 0 unless ($st->execute($$vdirs{$DBIx::FileSystem::vwd}{'defaultfile'}))
1220 0 0 if ($verbose == 0) { }
1221 0 0 if (@values) { }
1225 0 0 @defaults ? :
1237 0 0 if (@values) { }
1244 0 0 if ($verbose == 2)
1252 0 0 if ($print_it == 1)
1256 0 0 if ($$vdirs{$DBIx::FileSystem::vwd}{'defaultfile'} and $$vdirs{$DBIx::FileSystem::vwd}{'defaultfile'} ne $fnam)
1264 0 0 if ($$vdirs{$DBIx::FileSystem::vwd}{'defaultfile'} and $$vdirs{$DBIx::FileSystem::vwd}{'defaultfile'} ne $fnam)
1276 0 0 if (@defaults)
1278 0 0 if (defined $defaults[$i] and defined $flags[$i]) { }
0 0 elsif (defined $defaults[$i] and defined $enums[$i]) { }
0 0 elsif (defined $defaults[$i]) { }
1286 0 0 defined $def ? :
1312 0 0 if (defined $ref) { }
0 0 elsif (defined $flags) { }
0 0 elsif (defined $enums) { }
1320 0 0 unless ($st)
1324 0 0 unless ($st->execute)
1328 0 0 unless defined $value
1331 0 0 if (defined $value and $value eq $rval) { }
1339 0 0 if ($found == 0 and defined $value)
1348 0 0 if (exists $$flags{$i})
1349 0 0 if (length $$flags{$i}[0] > $maxlen)
1355 0 0 defined $value ? :
1359 0 0 if (exists $$flags{$i})
1362 0 0 if ($first) { }
1369 0 0 if (defined $value and $value & 1 << $i) { }
1376 0 0 if (defined $value) { }
1386 0 0 if (length $$enums{$i}[0] > $maxlen)
1393 0 0 if (defined $value and not exists $$enums{$value})
1399 0 0 if ($first) { }
1406 0 0 if (defined $value and $value == $i) { }
1416 0 0 if defined $value
1441 0 0 if (defined $flags) { }
0 0 elsif (defined $enums) { }
1449 0 0 if ($maxvarlen) { }
1454 0 0 if ($hasdefault) { }
1455 0 0 if (defined $value) { }
1458 0 0 defined $default ? :
1461 0 0 defined $value ? :
1482 0 0 if (defined $flags and defined $value)
1485 0 0 if (exists $$flags{$i})
1486 0 0 if ($value & 1 << $i)
1513 0 0 if (defined $enums and defined $value)
1514 0 0 if (exists $$enums{$value}) { }
1549 0 0 unless ($st)
1553 0 0 unless ($st->execute)
1598 0 0 if ($insert_flag) { }
1613 0 0 unless open TF, $tmpfile
1619 0 0 if $line =~ /^$/
1620 0 0 if $line =~ /^\#.*/
1621 0 0 unless ($line =~ /=/)
1630 0 0 if (length $var == 0 or $var =~ /\W+/)
1636 0 0 if (defined $varcol{$var}) { }
1637 0 0 if (defined $isset{$var})
1644 0 0 if ($vlen > 0) { }
1646 0 0 if (defined $$cols{$col}{'ref'}) { }
0 0 elsif ($$cols{$col}{'type'} eq 'char') { }
0 0 elsif ($$cols{$col}{'type'} eq 'int') { }
0 0 elsif ($$cols{$col}{'type'} eq 'smallint') { }
0 0 elsif ($$cols{$col}{'type'} eq 'cidr') { }
0 0 elsif ($$cols{$col}{'type'} eq 'inet') { }
1650 0 0 if (defined $$vdirs{$rdir}{'cols'}{$rfnc}{'len'}) { }
1652 0 0 if ($vlen > $rlen)
1657 0 0 if ($vlen > 1)
1666 0 0 unless ($st)
1671 0 0 unless ($st->execute($val))
1678 0 0 unless (defined $dbval)
1682 0 0 if ($insert_flag) { }
1693 0 0 if (defined $$cols{$col}{'len'}) { }
1694 0 0 if ($vlen > $$cols{$col}{'len'})
1699 0 0 if ($vlen > 1)
1704 0 0 if ($insert_flag) { }
1715 0 0 if (exists $$cols{$col}{'flags'}) { }
0 0 elsif (exists $$cols{$col}{'enums'}) { }
1716 0 0 if ($val eq '{') { }
1726 0 0 if $l =~ /^$/
1727 0 0 if $l =~ /^\#.*/
1728 0 0 if ($l eq 'On:')
1729 0 0 if ($l eq 'Off:')
1730 0 0 if ($l eq '}')
1731 0 0 if $mode eq '{'
1737 0 0 if ($$cols{$col}{'flags'}{$bit}[0] eq $l)
1739 0 0 if $mode eq 'on'
1743 0 0 unless ($flagfound)
1749 0 0 if ($mode ne '}')
1759 0 0 if ($val eq '{') { }
1769 0 0 if $l =~ /^$/
1770 0 0 if $l =~ /^\#.*/
1771 0 0 if ($l eq 'Selected:')
1772 0 0 if ($l eq 'Available:')
1773 0 0 if ($l eq '}')
1776 0 0 if ($$cols{$col}{'enums'}{$enumval}[0] eq $l)
1778 0 0 if ($mode eq 'sel')
1779 0 0 if ($val eq 'NULL') { }
1789 0 0 unless ($enumfound)
1794 0 0 if ($mode ne '}')
1803 0 0 unless ($val =~ /^-?\d+$/)
1807 0 0 if ($val <= -2147483648 or $val >= 2147483647)
1812 0 0 if ($insert_flag) { }
1823 0 0 unless ($val =~ /^-?\d+$/)
1827 0 0 if ($val <= -32768 or $val >= 32767)
1831 0 0 if ($insert_flag) { }
1845 0 0 unless ($st)
1850 0 0 unless ($st->execute)
1857 0 0 if ($insert_flag) { }
1871 0 0 unless ($st)
1876 0 0 unless ($st->execute)
1883 0 0 if ($insert_flag) { }
1898 0 0 if ($insert_flag) { }
1914 0 0 if ($insert_flag) { }
1920 0 0 if (chop $sql1 ne ',')
1931 0 0 unless (defined $err)
1934 0 0 if (exists $$cols{$col}{'uniq'})
1935 0 0 if (exists $$cols{$col}{'valok'})
1937 0 0 if (defined $valerr)
1949 0 0 if (not defined $err and $hasuniqcols == 1)
1952 0 0 if (exists $$cols{$col}{'uniq'})
1957 0 0 unless ($st)
1962 0 0 unless ($st->execute("$filevars{$col}"))
1971 0 0 if ($valerr ne '')
1999 0 0 unless defined $inp
2036 0 0 if $col eq $fnc
2040 0 0 exists $$cols{$col}{'flags'} ? :
2041 0 0 exists $$cols{$col}{'enums'} ? :
2051 0 0 if ($$vdirs{$DBIx::FileSystem::vwd}{'defaultfile'})
2054 0 0 unless ($st)
2058 0 0 unless ($st->execute($$vdirs{$DBIx::FileSystem::vwd}{'defaultfile'}))
2069 0 0 unless ($st)
2073 0 0 unless ($st->execute)
2080 0 0 if (@values)
2082 0 0 if ($$vdirs{$DBIx::FileSystem::vwd}{'defaultfile'} and $$vdirs{$DBIx::FileSystem::vwd}{'defaultfile'} ne $fnam) { }
2093 0 0 if $line =~ /$pattern/i
2131 1 0 if (exists $params{'dbconn'} and defined $params{'dbconn'}) { }
2138 1 0 if (exists $params{'progdbver'} and defined $params{'progdbver'}) { }
2149 0 0 unless ($$self{'dbh'})
2169 0 1 if defined $$self{'dbh'}
2194 0 0 if (defined $$self{'dbh'})
2198 0 0 if ($st) { }
2199 0 0 if ($st->execute) { }
2201 0 0 if ($dbdbver eq $$self{'progdbver'}) { }
2215 0 0 if ($ret)
2216 0 0 if defined $$self{'dbh'}
2270 0 0 unless (defined $$self{'dbh'})
2276 0 0 if (not defined $dir or $dir eq '')
2280 0 0 if (not defined $fnamcol or $fnamcol eq '')
2284 0 0 if (ref $vars ne 'HASH')
2288 0 0 if (keys %{$vars;} == 0)
2292 0 0 if (ref $searchvars ne 'HASH')
2296 0 0 if (keys %{$searchvars;} == 0)
2311 0 0 if (defined $defaultfname) { }
2317 0 0 unless ($st)
2321 0 0 if ($st->execute) { }
2323 0 0 if (defined $res and $res == 1) { }
2350 0 0 if $rest
2353 0 0 unless $rest
2358 0 0 if (not defined $res or defined $$self{'dbh'}{'err'})
2363 0 0 if (@$res == 0) { }
0 0 elsif (@$res == 1) { }
2380 0 0 if (defined $defaultfname)
2385 0 0 if ($r == 0) { }
2387 0 0 unless defined $$vars{$var}
2390 0 0 if ($r == 1) { }
0 0 elsif ($r == 2) { }
2423 0 0 if (not defined $val) { }
0 0 elsif (ref $val eq 'ARRAY') { }
2426 0 0 if (defined $$val[0] and defined $$val[1]) { }
2427 0 0 if ($self->isanumber($$val[1])) { }
2436 0 0 if ($self->isanumber($val)) { }
2462 1 40 if (not defined $str) { }
1 39 elsif ($str eq '') { }
7 32 elsif ($str =~ / /) { }
2 30 elsif ($str =~ /infinity/i) { }
2 28 elsif ($str =~ /nan/i) { }
2475 9 19 if ($unparsed != 0 or $!)