Branch Coverage

blib/lib/Getopt/Again.pm
Criterion Covered Total %
branch 68 80 85.0


line true false branch
69 0 1 unless $self->can($i)
107 7 12 if ($seen{$f}++) { }
125 1539 810 if ($key eq $$opt{'name'}) { }
143 143 5 if $config
146 4 5 unless $opt =~ /$$config{'regex'}/
157 0 19 unless defined $name and not ref $name
162 17 2 @params > 1 ? :
166 0 19 unless reftype $alias eq 'ARRAY'
171 3 16 if ($$config{'regex'})
176 0 22 if $self->_named_params->{$name} and $self->_named_params->{$name} != $config
188 2 0 $params{'regex'} || length $params{'name'} > 1 ? :
193 0 19 if $process and not ref $process && reftype($process) =~ /^(REGEXP|CODE)$/
197 1 18 unless ref $alias
198 0 19 unless reftype $alias eq 'ARRAY'
203 0 32 unless $VALID_FIELDS{$field}
225 1 28 if ($item eq '--')
230 24 4 if ($item =~ /^(-{1,2})([^=]+)(?:=(.*))?$/ and not $no_parse) { }
234 3 21 if ($val)
240 22 2 if ($dash > 1) { }
268 24 0 if (ref $set) { }
276 0 24 unless $spec
278 4 20 if ($$spec{'type'} eq 'bool') { }
279 3 1 !$$spec{'default'} ? :
282 5 15 if ($$spec{'type'} eq 'regex' and $name =~ /$$spec{'regex'}/) { }
12 3 elsif (not defined $val) { }
289 9 11 if ($$spec{'list'}) { }
304 16 41 if defined $$out{$$opt{'name'}}
306 9 32 if $$opt{'list'}
316 17 30 unless defined $$out{$opt}
319 2 28 if $$spec{'list'} and defined $$spec{'split_on'}
322 8 22 if ($$spec{'process'})
324 6 2 if ($type eq 'CODE') { }
329 0 2 $$spec{'list'} ? :
331 1 1 if $item =~ /$$spec{'process'}/
341 1 3 if @_
355 85 33 length $alias > 1 ? :
357 12 65 if ($$opt{'regex'})
360 4 73 if $$opt{'description'}
384 0 1 unless $bool
390 2 1 unless $_