Condition Coverage

blib/lib/Type/Tiny/Enum.pm
Criterion Covered Total %
condition 28 41 68.2


and 3 conditions

line !l l&&!r l&&r condition
73 215 1 3 defined $opts{'coercion'} and not ref $opts{'coercion'}
216 0 3 defined $opts{'coercion'} and not ref $opts{'coercion'} and 1 eq $opts{'coercion'}
227 0 1 2 defined $flags and $flags =~ /^[i]*$/
245 0 57 397 $xsub and not $Type::Tiny::AvoidCallbacks
382 2 0 1 defined $best and length $best >= length $possible
443 753 8 136 $self->{''} and scalar keys %$self == 1

or 2 conditions

line l !l condition
434 160 881 $ref->{$char} ||= {}

or 3 conditions

line l !l&&r !l&&!r condition
35 0 0 2 ref $caller or $caller eq "-lexical"
0 1 1 ref $caller or $caller eq "-lexical" or $globals->{'lexical'}
114 50 9 0 $_[0]{'constraint'} ||= $_[0]->_build_constraint
137 0 8 0 $base_name ||= $self->name
220 89 16 0 $self->{'_regexp'} ||= "Type::Tiny::Enum::_Trie"->handle($self->unique_values)
358 8 1 0 $canon ||= eval($] lt "5.016" ? " sub { ( my \$var = lc(\$_[0]) ) =~ s/(^\\s+)|(\\s+\$)//g; \$var } " : " sub { CORE::fc(\$_[0]) =~ s/(^\\s+)|(\\s+\$)//gr; } ")
364 8 1 0 $self->{'_lookups'} ||= do { my %lookups; foreach $_ (@{$self->values;}) { my $key = &$canon($_); next if exists $lookups{$key}; $lookups{$key} = $_; } ; \%lookups }