Branch Coverage

lib/Getopt/Type/Tiny.pm
Criterion Covered Total %
branch 70 82 85.3


line true false branch
31 9 21 unless $name =~ /^(ArrayRef|HashRef)/u
34 16 5 $container eq 'ArrayRef' ? :
38 0 21 unless $param
41 1 0 $coerce && $param->has_coercion ? :
1 1 $param->equals(&Any()) ? :
10 2 $param->is_a_type_of(&Str()) ? :
2 12 $param->is_a_type_of(&Num()) ? :
7 14 $param->is_a_type_of(&Int()) ? :
49 0 21 unless $sigil
59 9 25 unless $type_name =~ /^(ArrayRef|HashRef)/u
64 2 23 unless ($param)
65 1 1 $container eq 'ArrayRef' ? :
84 2 21 unless ($is_supported)
85 1 1 $container eq 'ArrayRef' ? :
113 35 3 is_HashRef($arg_specs[0]) ? :
117 34 4 if (exists $options->{'isa'})
120 0 34 if ($options->{'coerce'} and not $types{$name}->has_coercion)
134 21 9 if ($inferred_modifier) { }
9 0 elsif ($types{$name}->name ne 'Bool' and not $this_getopt_spec =~ /=/u) { }
137 6 15 if ($this_getopt_spec =~ /=[a-z][\@%]$/u) { }
141 1 5 if ($explicit_modifier ne $inferred_modifier and not $options->{'nowarn'})
161 0 9 if ($this_getopt_spec =~ s/=[a-z]$/=s/u) { }
172 0 6 if (exists $options->{'default'} and exists $options->{'required'})
175 6 28 if (exists $options->{'default'}) { }
25 3 elsif (exists $options->{'isa'}) { }
182 14 11 if ($type_name =~ /^ArrayRef/u) { }
4 7 elsif ($type_name =~ /^HashRef/u) { }
189 1 33 if exists $options->{'rename'}
191 2 32 if exists $options->{'required'}
192 2 32 if exists $options->{'coerce'}
196 4 30 unless $this_getopt_spec =~ /=/u
208 0 30 if ($opt_for{'help'})
212 0 30 if ($opt_for{'man'})
216 0 30 unless ($result)
222 16 8 if exists $opt_for{$name}
226 3 5 is_CodeRef($defaults{$name}) ? :
233 4 30 if (exists $opt_for{$name} and not $type->check($opt_for{$name}))
234 2 2 if ($coerce)
236 2 0 if ($type->check($new_val))
247 1 1 if ($required{$name} and not exists $opt_for{$name})
255 1 0 if exists $opt_for{$name}