Branch Coverage

blib/lib/Getopt/LongUsage.pm
Criterion Covered Total %
branch 70 90 77.7


line true false branch
35 0 5 if ref $_[0] eq $Getopt::LongUsage::REF_NAME or undef
47 5 0 if (@optionlist and ref $optionlist[0] and UNIVERSAL::isa($optionlist[0], 'HASH'))
59 0 5 if (@optionlist and $optionlist[0] =~ /^\W+$/ and not $optionlist[0] eq '<>' && @optionlist > 0 && ref $optionlist[1])
72 0 28 unless (defined $opt)
90 0 28 unless (defined $name)
94 0 28 if @optionlist and ref $optionlist[0]
110 5 0 if ref $_[0] eq $Getopt::LongUsage::REF_NAME or undef
112 2 3 if exists $args{'format'}
119 4 1 if (exists $args{'descriptions'})
124 0 19 if not defined $k or $k eq ''
137 6 36 if lc $element eq lc $a
146 9 25 if exists $$hash{$key}
148 9 48 if (lc $key eq lc $hk)
171 0 5 unless (exists $args{'Getopt_Long'})
179 4 1 if (exists $args{'descriptions'} and ref $args{'descriptions'} eq 'ARRAY')
181 3 16 if (&$elementexists($args{'descriptions'}[$tmp_ordernumber], $args{'hidden_opts'}))
185 1 15 if (not exists $$optionmap{lc $args{'descriptions'}[$tmp_ordernumber]}) { }
188 15 0 unless (not defined $args{'descriptions'}[$tmp_ordernumber] or $args{'descriptions'}[$tmp_ordernumber] eq '')
201 0 38 if not defined $opt or $opt eq ''
203 0 38 unless defined $ctlname
204 28 10 unless (exists $$usagemap{$ctlname})
207 10 28 unless (lc $opt eq lc $ctlname)
210 18 20 if (@{$$usagemap{$ctlname}[1];} == 0 and my $desc = &$gethashvalue($opt, \%descriptions))
225 1 4 defined $format{'longprefix'} ? :
226 1 4 defined $format{'shortprefix'} ? :
227 0 5 defined $format{'cols'} ? :
228 2 3 defined $format{'tab'} ? :
229 2 3 defined $format{'indent'} ? :
238 25 3 unless (&$elementexists($optname, $args{'hidden_opts'}))
239 10 15 if (length $optname == 1) { }
246 0 10 unless defined $opt
247 0 10 if lc $opt eq lc $optname
248 0 10 if (length $opt == 1)
249 0 0 unless &$elementexists($opt, $args{'hidden_opts'})
252 10 0 unless &$elementexists($opt, $args{'hidden_opts'})
254 3 15 if @shortopt == 0 and not defined $mainopt and @aliasopt == 0
256 10 15 if @shortopt > 0
257 15 10 if defined $mainopt
258 10 15 if @aliasopt > 0
260 14 11 if length $opttext > $maxoptwidth
263 15 10 if (exists $$ordermap{$optname}) { }
275 3 2 if defined $args{'header'}
276 3 2 if defined $args{'cli_use'}
280 0 25 if (not defined $outline or ref !($outline =~ /ARRAY/) or not defined $$outline[0][0]) { }
293 3 2 if defined $args{'footer'}