Branch Coverage

blib/lib/Getopt/Long/More.pm
Criterion Covered Total %
branch 37 120 30.8


line true false branch
43 0 0 if wantarray
44 0 0 if (@$args)
68 3 13 if (ref $_[0])
70 3 0 if (&Scalar::Util::reftype($_[0]) eq 'HASH')
79 0 16 if ($Getopt::Long::auto_help)
88 0 16 if ($Getopt::Long::auto_version)
104 30 12 if (ref $e ne 'Getopt::Long::More::OptSpec')
105 9 3 if ($prev ne '<>')
119 0 16 if ($ENV{'COMP_SHELL'}) { }
0 16 elsif ($ENV{'COMMAND_LINE'}) { }
127 0 16 if ($ENV{'COMP_LINE'} or $ENV{'COMMAND_LINE'})
129 0 0 if ($ENV{'COMP_LINE'}) { }
0 0 elsif ($ENV{'COMMAND_LINE'}) { }
142 0 0 if ($i % 2 == 0)
145 0 0 if (ref $os eq 'Getopt::Long::More::OptSpec')
147 0 0 unless $completion
148 0 0 if (ref $completion eq 'ARRAY')
158 0 0 if ($o eq '<>') { }
169 0 0 if ($args{'type'} eq 'optval' and $opt_completions{$args{'ospec'}}) { }
0 0 elsif ($args{'type'} eq 'arg' and $arg_completion) { }
185 0 0 if ($shell eq 'bash') { }
0 0 elsif ($shell eq 'fish') { }
0 0 elsif ($shell eq 'tcsh') { }
0 0 elsif ($shell eq 'zsh') { }
212 12 30 if ($i > 0 and ref $_ eq 'Getopt::Long::More::OptSpec')
216 4 8 if ($_->{'required'})
217 2 2 if ($osname eq '<>') { }
218 2 0 if ($has_arg_handler) { }
219 1 1 unless ($arg_handler_accessed)
223 0 0 unless (@{$ary;})
228 1 1 if (ref $_->{'handler'} eq 'SCALAR' and not defined ${$$_{'handler'};}) { }
0 1 elsif (ref $_->{'handler'} eq 'ARRAY' and not @{$_->{'handler'};}) { }
0 2 elsif (ref $_->{'handler'} eq 'HASH' and not keys %{$$_{'handler'};}) { }
243 3 7 if (defined $_->{'default'})
244 1 2 if ($osname eq '<>') { }
247 1 1 if (ref $_->{'handler'} eq 'SCALAR' and not defined ${$$_{'handler'};}) { }
0 1 elsif (ref $_->{'handler'} eq 'ARRAY' and not @{$_->{'handler'};}) { }
0 2 elsif (ref $_->{'handler'} eq 'HASH' and not keys %{$$_{'handler'};}) { }
268 0 0 @_ ? :
273 0 0 if ($i % 2 == 0)
276 0 0 if $osname eq '<>'
279 0 0 length $oname > 1 ? :
283 0 0 if $max_opt_spec_len < $len
285 0 0 if (ref $os eq 'Getopt::Long::More::OptSpec')
287 0 0 if $os->{'required'}
301 0 0 $_->[3] ? :
0 0 defined $_->[4] ? :
313 0 0 @_ ? :
317 0 0 if ($i % 2 == 0)
320 0 0 if $osname eq '<>'
323 0 0 length $oname > 1 ? :
327 0 0 if (ref $os eq 'Getopt::Long::More::OptSpec')
330 0 0 if $os->{'required'}
341 0 0 if ($_->[3])
342 0 0 if (defined $_->[4])
343 0 0 @notes ? :
344 0 0 if length $_->[1]
345 0 0 if length $_->[2]
359 4 23 if /\A(x|x\..+|_.*)\z/
360 2 21 unless (/\A(handler|required|default|summary|description|completion)\z/)