Branch Coverage

blib/lib/Hub/Perl/Language.pm
Criterion Covered Total %
branch 61 330 18.4


line true false branch
81 0 0 ref($unk) =~ /^(SCALAR|REF)$/ ? :
0 0 isa($unk, 'ARRAY') ? :
0 0 isa($unk, 'HASH') ? :
0 0 !ref($unk) ? :
0 0 !defined($unk) ? :
171 0 37 if $$opts{'ref'}
173 0 37 if $$opts{'isa'}
177 0 37 if (($opt, $val) = $$opts{'test'} =~ /^(\w+)=(.*)/)
185 0 0 $$opts{'opr'} eq 'or' ? :
37 0 $$opts{'opr'} eq 'and' ? :
193 0 37 if $$opts{'test'} eq 'def'
195 0 37 if $$opts{'test'} eq 'num'
197 0 37 if $$opts{'test'} eq 'str'
199 0 37 if $$opts{'test'} eq 'match'
201 37 0 blessed($_[$i]) ? :
37 0 if $$opts{'test'} eq 'blessed'
203 0 37 if $$opts{'test'} eq 'isa'
205 0 37 if ($$opts{'test'} eq 'ref')
207 0 0 if (ref $_[$i] and $$opts{'ref'})
215 0 37 if ($$opts{'test'} eq 'eval')
220 0 0 !ref($_[$i]) ? :
0 0 ref $_[$i] eq 'CODE' ? :
229 37 0 if $$opts{'opr'} eq 'and'
231 0 37 if $$opts{'opr'} eq 'or'
233 0 37 if ($$opts{'opr'} eq 'xor')
235 0 0 if ($i % 2 == 0) { }
249 0 37 unless $ok
348 93 93 ref $_[0] eq 'HASH' ? :
350 9 177 if @_
351 0 186 if defined $argv and not isa($argv, 'ARRAY')
352 33 153 unless defined $argv and @$argv
354 9 265 unless defined $$argv[$idx]
355 54 211 if ref $$argv[$idx]
356 141 70 if (my($prefix, $k) = $$argv[$idx] =~ /^($$opts{'append'}|$$opts{'prefix'})((?!\d|$$opts{'prefix'}).*)$/)
358 0 141 unless $k
359 0 141 if ($k eq 'opts') { }
47 94 elsif ($k =~ /$$opts{'assign'}/) { }
86 8 elsif ($idx < $#$argv) { }
360 0 0 if defined $$argv[$idx + 1]
368 86 0 if (not defined $$argv[$idx + 1] or defined $$argv[$idx + 1] and not $$argv[$idx + 1] =~ /^($$opts{'append'}|$$opts{'prefix'})(?!\d)/) { }
385 17 136 if wantarray
411 15 21 if @$params
443 0 0 if ($arg =~ /^-\w/) { }
454 0 0 defined $$result{$flag} ? :
480 0 0 if scalar(@fields) % 2 != 0
491 141 0 unless ($_[4] =~ /^$$opts{'append'}$/)
495 0 0 if (defined $_[1]{$_[2]}) { }
496 0 0 if (ref $_[1]{$_[2]} eq 'ARRAY') { }
531 0 0 unless Hub::check($s, $l, $r)
532 0 0 if ref $s eq 'SCALAR'
535 0 0 if $@
547 0 0 if Hub::check($_[0], -'test', 'num')
548 0 0 if ($HAS_GETPWNAM) { }
549 0 0 unless my($login, $pass, $uid, $gid) = getpwnam $_[0]
564 0 0 if Hub::check($_[0], -'test', 'num')
565 0 0 if ($HAS_GETGRNAM) { }
566 0 0 unless my($name, $passwd, $gid, $members) = getgrnam $_[0]
580 0 0 unless -e $_
621 0 36 defined $$opts{'not'} ? :
624 0 36 if ($$opts{'match'}) { }
36 0 elsif ($$opts{'blessed'}) { }
0 0 elsif ($$opts{'ref'}) { }
625 0 0 unless Hub::check("-test=match=$$opts{'match'}", @_) xor $invert
630 0 36 unless Hub::check('-test=blessed', $$opts{'blessed'}, @_) xor $invert
634 0 0 unless Hub::check("-ref=$$opts{'ref'}", @_) xor $invert
639 0 0 unless defined $k
640 0 0 $invert ? :
0 0 if $invert ? ref $v eq $k : ref $v ne $k
673 0 0 unless defined $$opts{'back'}
690 1 30 unless (defined $best)
692 1 0 if $$opts{'by'} eq 'def' and defined $best
695 30 0 if (defined $_[$i] and defined $best)
697 0 30 if $$opts{'by'} eq 'gt'
698 0 30 if $$opts{'by'} eq 'lt'
699 0 30 if $$opts{'by'} eq 'max' and Hub::check('-test=num', $_[$i], $best)
701 0 30 if $$opts{'by'} eq 'min' and Hub::check('-test=num', $_[$i], $best)
703 0 30 if $$opts{'by'} eq 'len'
704 0 0 defined $_[$i] && $_[$i] ? :
0 0 defined $best && $best ? :
0 30 if $$opts{'by'} eq 'true'
710 0 30 if $isbetter
764 0 0 if $divisor == 0
775 0 0 if (isa($hash, 'HASH'))
778 0 0 if ($$new_hash{$v}) { }
779 0 0 unless isa($$new_hash{$v}, 'ARRAY')
799 0 0 if (isa($container, 'HASH')) { }
0 0 elsif (isa($container, 'ARRAY')) { }
801 0 0 if ($$container{$key} eq $value)
808 0 0 if ($item eq $value) { }
831 0 1 unless ref $ref
832 1 0 if (isa($ref, 'HASH')) { }
0 0 elsif (isa($ref, 'ARRAY')) { }
0 0 elsif (isa($ref, 'SCALAR')) { }
0 0 elsif (ref $ref eq 'REF') { }
0 0 elsif (ref $ref eq 'CODE') { }
833 0 1 blessed $ref ? :
836 0 22 if (ref $v) { }
837 0 0 unless $v eq $ref
843 0 0 blessed $ref ? :
845 0 0 if (ref $v) { }
855 0 0 if $$ref eq $ref
857 0 0 if $$ref ne $ref
893 0 0 if (ref $param eq 'HASH') { }
0 0 elsif (ref $param eq 'ARRAY') { }
0 0 elsif (ref $param eq 'SCALAR') { }
0 0 elsif (ref $param eq 'Fh') { }
900 0 0 if $param =~ /(.*)/
943 0 0 unless defined $target
944 0 0 $$opts{'copy'} ? :
945 0 0 unless isa($dh, 'HASH')
954 0 0 if ($$opts{'prune'})
957 0 0 unless defined $$sh{$k}
969 0 0 if (defined $$sa[$i])
970 0 0 if (isa($$da[$i], 'HASH') and isa($$sa[$i], 'HASH')) { }
0 0 elsif (isa($$da[$i], 'ARRAY') and isa($$sa[$i], 'ARRAY')) { }
0 0 elsif (not exists $$da[$i] or $$opts{'overwrite'}) { }
983 0 0 if (defined $$dh{$k}) { }
984 0 0 if (isa($$dh{$k}, 'HASH') and isa($v, 'HASH')) { }
0 0 elsif (isa($$dh{$k}, 'ARRAY') and isa($v, 'ARRAY')) { }
990 0 0 if $$opts{'overwrite'}
994 0 0 defined $vcopy ? :
1007 0 0 if (isa($ptr, 'HASH')) { }
0 0 elsif (isa($ptr, 'ARRAY')) { }
1010 0 0 if (ref $v) { }
1014 0 0 if (not $k or $v =~ /\n/) { }
1023 0 0 if (ref $v) { }
1055 0 0 unless $str
1063 0 0 if (eval "\$substr =~ $replace")
1098 0 0 unless ref $r
1104 0 0 if (ref $r eq 'ARRAY') { }
0 0 elsif (ref $r eq 'HASH') { }
1108 0 0 if (ref $elem eq 'HASH')
1110 0 0 if ($$elem{'_id'})
1128 0 0 if (ref $$h{$k}) { }
1168 0 0 if (isa($l, 'HASH')) { }
0 0 elsif (isa($l, 'ARRAY')) { }
1183 0 0 unless ref $l eq 'HASH'
1184 0 0 unless ref $r eq 'HASH'
1188 0 0 if (defined $$r{$key}) { }
1189 0 0 if (ref $$l{$key} eq ref $$r{$key}) { }
1190 0 0 if (ref $$l{$key} eq 'HASH') { }
0 0 elsif (ref $$l{$key} eq 'ARRAY') { }
1192 0 0 if $subh
1195 0 0 if $suba
1197 0 0 unless $$l{$key} eq $$r{$key}
1208 0 0 unless defined $$l{$key}
1221 0 0 unless isa($l, 'ARRAY')
1222 0 0 unless isa($r, 'ARRAY')
1229 0 0 if (ref $lval eq ref $rval) { }
1230 0 0 if (ref $lval eq 'HASH') { }
0 0 elsif (ref $rval eq 'ARRAY') { }
1232 0 0 if $subh
1235 0 0 if $suba
1237 0 0 unless $lval eq $rval
1244 0 0 if ($#$l > $#$r) { }
1304 0 0 unless $ic > 0
1309 0 0 if ($p3 > $p) { }
1320 0 0 if $text
1345 0 0 unless defined $str
1346 0 0 unless defined $expr
1347 0 0 unless defined $from
1349 0 0 unless defined $temp_str
1352 0 0 if defined $match[0]
1353 0 0 $$opts{'after'} ? :
0 0 defined $pos ? :