Branch Coverage

blib/lib/Resources.pm
Criterion Covered Total %
branch 80 202 39.6


line true false branch
358 0 1 unless $$res{'Safe'} = 'Safe'->new
364 1 0 unless ($resfile and $resfile eq '_RES_NODEFAULTS')
370 1 0 if (($app = $Resources::Resources{'resources.appclass'}[$Resources::Value]) =~ /\./)
380 0 1 if ($resfile and $resfile ne '_RES_NODEFAULTS')
381 0 0 unless $res->load($resfile)
421 0 0 unless defined $filnam
423 0 0 unless open _RESFILE, $filnam
439 0 0 if (not $comlin =~ /\#/ and $comlin =~ /\\$/) { }
461 0 0 unless $name
464 0 0 if $mrgcls and not $name =~ /^\*|^$app\./
471 0 0 if $name =~ /\s+|^\.|\.$|\*$|\._/o
476 0 0 if ($value =~ s/^\'(.*)\'$|^\"(.*)\"$/$1/) { }
0 0 elsif ($value =~ /^[\[\{].*/) { }
481 0 0 if ($@) { }
496 0 0 if ($nonew)
500 0 0 unless ($resnames =~ /$name/)
509 0 0 unless ($res->put($name, @{$value;}))
570 1 0 unless $$res{'Owned'}{$mem}
579 2 1 if (defined @{$isa;})
581 1 1 unless $$res{'Isa'}{$base}
591 3 0 if ($class ne 'main' and $class ne lc $$res{'Res'}{'resources.appclass'}[$Resources::Value])
596 2 2 if $caller eq 'main'
597 1 1 if (exists $$res{'Isa'}{$class} and $$res{'Isa'}{$class} =~ /\b$caller\b/)
602 1 0 if (exists $$res{'Owned'}{$toppack} and $$res{'Owned'}{$toppack} =~ /\b$caller\b/)
609 0 2 if $tops[0] =~ /main/o
611 2 0 if $res->valbyname('resources.mergeclass')
614 2 0 if $app
686 0 30 if (exists $$res{'Res'}{$fullname}) { }
30 0 elsif (exists $$res{'Res'}{$name}) { }
712 0 22 if (exists $$res{'Res'}{$fullname}) { }
22 0 elsif (exists $$res{'Res'}{$name}) { }
741 0 0 if $name =~ /$pattern/
744 0 0 if %{$$newres{'Res'};}
848 0 4 unless ($class = ref $object)
853 0 4 if ($suffix =~ /\.|\*/)
867 4 6 if $toppack eq 'main'
871 2 4 if (exists $$res{'Isa'}{$class} and $$res{'Isa'}{$class} =~ /\b$toppack\b/)
879 2 2 if (exists $$res{'Owned'}{$class} and $$res{'Owned'}{$class} =~ /\b$toppack\b/)
890 0 4 unless exists $$res{'Res'}{$name}
999 0 24 unless defined $name and defined $value
1007 0 24 if scalar @words > 1 or $name =~ /^\.|\.$|\*$/
1020 0 24 if ($name =~ /\*/) { }
1034 0 0 if $wild =~ /$patname\Z/
1037 0 0 if $name =~ /$wild\Z/
1039 0 0 unless $I_have
1043 0 0 if $r =~ /$patname\Z/
1052 0 24 if ($name =~ /$wild\Z/)
1061 14 10 $ex ? :
1066 12 12 if ($putall) { }
0 12 elsif ($putdoc) { }
1068 0 12 if $doc
1093 0 0 unless exists $$res{'Res'}{$name}
1120 0 0 if $i eq $name
1149 0 0 if ($p = $ENV{'RESPAGER'}) { }
0 0 elsif ($p = $res->valbyname('resources.pager')) { }
0 0 elsif ($p = $ENV{'PAGER'}) { }
1164 0 0 unless $p
1208 0 1 if ($p = $ENV{'RESEDITOR'}) { }
1 0 elsif ($p = $res->valbyname('resources.editor')) { }
1222 0 1 unless $p
1225 1 0 if $status >> 8
1228 0 0 unless $newres->load($tmpfil, $nonew)
1232 0 0 if (exists $$res{'Res'}{$p} and defined $$res{'Res'}{$p}[$Resources::Doc])
1269 0 1 unless defined $filnam
1270 1 0 unless $filnam =~ /^\|/
1271 0 1 unless open RESOUT, $filnam
1275 0 1 if ($res->valbyname('resources.writepod')) { }
1280 0 0 if $name =~ /\._/
1287 0 0 if ref $val
1305 1 0 unless $doc
1308 0 1 if ref $value
1315 0 22 if $name =~ /\._/o
1318 0 22 if ref $value
1319 12 10 $doc ? :
1367 0 0 unless $ref = ref $value
1378 0 0 if ($ref eq 'ARRAY')
1383 0 0 if ($refref = ref $element) { }
0 0 elsif (_isint($element) or _isreal($element)) { }
1398 0 0 if ($ref eq 'HASH')
1403 0 0 if ref $nam
1404 0 0 if ($refref = ref $val) { }
0 0 elsif (_isint($val) or _isreal($val)) { }
1449 3 3 unless $packclass
1454 0 6 unless (/^%/)
1463 6 0 if (defined %{$def;})
1468 0 22 if ($dname =~ /\*|^\.|\.$|\:/)
1474 0 22 unless ($vref = ref $dvalue and $vref =~ /ARRAY/o and scalar @{$dvalue;} <= 2 and not ref $$dvalue[1])
1482 0 22 if ($top eq 'main') { }
15 7 elsif ($top eq $packclass) { }
1490 0 22 unless $res->put($dname, @{$dvalue;})
1506 3 3 if (defined @{$isa;})
1508 0 3 unless $res->_merge_pack($app, $top, $base, $packclass)
1524 0 0 if $res->valbyname('resources.verbosity')
1546 0 1 unless $cols
1550 24 5 if (length $line <= $cols)
1560 0 5 if (($commlen = $cols - $deflen % $cols) < $mincols) { }
1568 0 5 unless $comms[0]
1570 5 0 if (not $below) { }
1595 10 42 unless $wd
1597 2 40 if $lw + $ls > $len
1601 2 10 if $wd