Branch Coverage

blib/lib/Type/Tiny/Enum.pm
Criterion Covered Total %
branch 93 118 78.8


line true false branch
35 0 1 $INC{'Type/Registry.pm'} ? :
1 1 unless ref $caller or $caller eq "-lexical" or $globals->{'lexical'}
42 0 223 @_ == 1 ? :
45 1 222 if exists $opts{'parent'}
48 1 221 if exists $opts{'constraint'}
51 0 221 if exists $opts{'sorter'}
54 1 220 if exists $opts{'inlined'}
55 1 219 unless exists $opts{'values'}
60 219 0 ref $opts{'values'} eq 'ARRAY' ? :
68 213 6 if (defined $xs_encoding)
70 213 0 if $xsub
73 3 1 if (defined $opts{'coercion'} and not ref $opts{'coercion'} and 1 eq $opts{'coercion'})
82 9 0 @_ ? :
97 0 1 @_ == 1 ? :
105 0 1 @_ == 1 ? :
115 105 14 if exists $_[0]{'use_eq'}
136 8 0 unless ($self->is_anon)
142 7 1 if ($self->is_word_safe)
173 0 667 if @$unique_values > 50
175 87 0 eval { do { 'Type::Tiny::XS'->VERSION('0.020'); 1 } } ? :
87 580 unless defined $new_xs
177 667 0 if ($new_xs) { }
185 0 0 if grep /\W/, @$unique_values
198 3 6 if $cached{$regexp}
199 45 0 if defined $_
211 2 4 if $cached{$regexp}
226 2 1 @_ ? :
227 1 2 unless (defined $flags and $flags =~ /^[i]*$/)
233 1 1 $flags ? :
243 454 58 if (my $xs_encoding = _xs_encoding($self->unique_values))
245 397 57 if $xsub and not $Type::Tiny::AvoidCallbacks
249 27 88 if ($self->use_eq) { }
253 0 27 if (@vals == 1) { }
262 4 84 $_[0] eq '$_' ? :
268 81 34 if $Type::Tiny::AvoidCallbacks
296 0 1 unless defined $varname
298 0 1 if $self->check($value)
301 1 0 @$self < 13 ? :
0 1 if (not defined $value) { }
332 1 6 if exists $hash{$value}
343 6 3 exists $hash{$_[0]} ? :
354 0 9 unless Types::Standard::is_Str($given)
356 0 9 if $self->check($given)
358 0 1 $] lt '5.016' ? :
368 0 3 if exists $lookups{$key}
376 2 7 if $self->{'_lookups'}{$cgiven}
381 3 18 if ($cgiven eq &$canon($stem))
382 1 2 if (defined $best and length $best >= length $possible)
389 2 5 if defined $best
391 4 1 if Types::Standard::is_Int($given)
443 136 761 if $self->{''} and scalar keys %$self == 1
448 881 8 if (ref $self->{$char}) { }
449 745 136 if (defined(my $recurse = _regexp($self->{$char}))) { }
461 120 5 @cc == 1 ? :
125 636 if @cc
462 714 47 @alt == 1 ? :
463 2 6 $cconly ? :
8 753 if $q
470 0 16 unless @$vals