Branch Coverage

blib/lib/Getopt/Long/Util.pm
Criterion Covered Total %
branch 64 102 62.7


line true false branch
71 2 23 if $optspec eq "<>"
73 2 21 unless $optspec =~ qr/\A (?P-{0,2}) (?P[A-Za-z0-9_][A-Za-z0-9_-]*) (?P (?: \| (?:[^:|!+=:-][^:|!+=:]*) )*)? (?: (?P!) | (?P\+) | (?: = (?P[siof]) (?P|[%\@])? (?: \{ (?: (?P\d+), )? (?P\d+) \} )? ) | (?: : (?P[siof]) (?P|[%\@])? ) | (?: : (?P-?\d+) (?P|[%\@])? ) | (?: : (?P\+) (?P|[%\@])? ) )? \z/x
111 1 20 if (defined $res{'optnum'})
115 7 14 if ($res{'aliases'}) { }
118 7 11 unless length $al
119 0 11 if $al eq $res{'name'}
120 0 11 if grep {$_ eq $al;} @als
130 3 18 if $res{'is_neg'}
131 1 20 if $res{'is_inc'}
197 3 10 if ref $_[0] eq "HASH"
200 0 13 unless my $parse = parse_getopt_long_opt_spec($optspec)
203 1 12 if $parse->{'is_arg'}
212 2 16 if ($parse->{'is_neg'} and length $_ > 1) { }
214 0 2 defined $opts->{'opt_link'} ? :
216 11 5 if (length $_ > 1) { }
218 0 11 defined $opts->{'opt_link'} ? :
221 0 5 defined $opts->{'opt_link'} ? :
223 8 2 if ($i == 1 and $parse->{'type'} || $parse->{'opttype'})
229 0 8 if $parse->{'opttype'}
230 3 5 $parse->{'type'} && $parse->{'desttype'} eq '%' ? :
231 3 5 if $parse->{'desttype'} eq "%"
233 0 8 if $parse->{'opttype'}
235 0 8 if $parse->{'opttype'}
236 3 5 $parse->{'type'} && $parse->{'desttype'} eq '%' ? :
237 3 5 if $parse->{'desttype'} eq "%"
238 0 8 defined $opts->{'value_label_link'} ? :
239 0 8 if $parse->{'opttype'}
241 5 11 if ($parse->{'desttype'} // "") =~ /@|%/
242 5 11 if ($parse->{'desttype'} // "") =~ /@|%/
245 6 12 if length $plain_res
246 6 12 if length $pod_res
252 1 11 if ($opts->{'extended'}) { }
304 0 0 unless defined $args{'filename'} xor defined $args{'string'}
315 0 0 if (defined $args{'filename'})
317 0 0 unless (-f $fn)
321 0 0 unless ($include_noexec or -x _)
326 0 0 unless (open $fh, "<", $fn)
332 0 0 unless ($str eq "#!")
337 0 0 unless ($shebang =~ /perl/)
348 0 0 unless ($str =~ /\A#!/)
352 0 0 unless ($str =~ /\A#!.*perl/)
367 0 0 if (/^\s*(use|require)\s+(Getopt::Long(?:::Complete|::Less|::EvenLess)?)(\s|;|$)/)
416 0 0 $2 ? :
0 0 $2 ? :
0 0 $is_getopt ? :
463 1 3 if @$go_spec and ref $go_spec->[0] eq "HASH"
469 5 4 if (@$go_spec and ref $go_spec->[0]) { }
2 2 elsif ($hash_storage) { }
472 0 2 unless my $res = parse_getopt_long_opt_spec($opt_spec)
475 1 1 unless exists $hash_storage->{$name}
478 1 1 ref $hash_storage->{$name} ? :