Branch Coverage

blib/lib/Number/Tolerant.pm
Criterion Covered Total %
branch 85 88 96.5


line true false branch
113 262 3 unless (eval { do { $plugin->can("construct") } })
114 1 261 unless eval "require $plugin"
117 1 263 unless (eval { do { $class->validate_plugin($plugin) } })
128 1 789 unless $plugin->can($_)
135 414 26 if $booted
152 1 138 unless @_
156 740 115 unless my(@args) = $type->valid_args(@_)
159 4 111 unless ref $guts and not &Scalar::Util::blessed($guts)
161 3 49 if (defined $guts->{'min'} and defined $guts->{'max'} and $guts->{'min'} == $guts->{'max'} and not $guts->{'constant'})
173 23 108 unless $self
196 1 33 if ref $class
198 29 143 if (defined(my $tolerance = $type->parse($string, $class)))
209 4 49 unless defined $self->{'min'} or defined $self->{'max'}
213 37 12 if (defined $self->{'min'})
214 10 27 $self->{'exclude_min'} ? :
219 33 16 if (defined $self->{'max'})
220 7 26 $self->{'exclude_max'} ? :
251 0 2 if $_[0]{'min'} and $_[0]{'max'} and $_[0]{'min'} == $_[0]{'max'}
260 108 564 $_[2] ? :
262 99 457 $_[2] ? :
264 25 25 $_[1] == $_[0] ? :
266 26 24 $_[1] == $_[0] ? :
269 28 635 if $_[0]{'exclude_min'} and $_[0]{'min'} == $_[1]
271 494 141 defined $_[0]{'min'} ? :
274 14 551 if $_[0]{'exclude_max'} and $_[0]{'max'} == $_[1]
276 427 124 defined $_[0]{'max'} ? :
288 6 18 unless (ref $_[1])
289 5 1 if $_[0] == $_[1]
296 8 10 if (defined $_[0]{'min'} and defined $_[1]{'min'}) { }
299 3 7 defined $_[0]{'min'} ? :
304 3 4 if $_[0]{'min'} and $min == $_[0]{'min'} and $_[0]{'exclude_min'} or $_[1]{'min'} and $min == $_[1]{'min'} and $_[1]{'exclude_min'}
306 8 10 if (defined $_[0]{'max'} and defined $_[1]{'max'}) { }
309 3 7 defined $_[0]{'max'} ? :
314 3 6 if $_[0]{'max'} and $max == $_[0]{'max'} and $_[0]{'exclude_max'} or $_[1]{'max'} and $max == $_[1]{'max'} and $_[1]{'exclude_max'}
316 1 17 unless defined $min or defined $max
318 2 2 $exclude_min ? :
4 13 unless defined $max
321 2 1 $exclude_max ? :
3 10 unless defined $min
324 0 10 if $max < $min or $min > $max
413 30 0 $_[0] > $_[1] ? :
19 30 $_[0] < $_[1] ? :
41 49 $_[0] == $_[1] ? :
417 49 41 if $_[2]