Condition Coverage

blib/lib/Type/Tiny/Enum.pm
Criterion Covered Total %
condition 27 41 65.8


and 3 conditions

line !l l&&!r l&&r condition
70 44 1 2 defined $opts{'coercion'} and not ref $opts{'coercion'}
45 0 2 defined $opts{'coercion'} and not ref $opts{'coercion'} and 1 eq $opts{'coercion'}
218 0 1 2 defined $flags and $flags =~ /^[i]*$/
237 0 55 253 $xsub and not $Type::Tiny::AvoidCallbacks
360 2 0 1 defined $best and length $best >= length $possible
421 43 2 20 $self->{''} and scalar keys %$self == 1

or 2 conditions

line l !l condition
412 8 57 $ref->{$char} ||= {}

or 3 conditions

line l !l&&r !l&&!r condition
35 0 0 1 ref $caller or $caller eq "-lexical"
0 0 1 ref $caller or $caller eq "-lexical" or $globals->{'lexical'}
111 30 5 0 $_[0]{'constraint'} ||= $_[0]->_build_constraint
128 0 7 0 $base_name ||= $self->name
211 54 8 0 $self->{'_regexp'} ||= "Type::Tiny::Enum::_Trie"->handle($self->unique_values)
336 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; } ")
342 8 1 0 $self->{'_lookups'} ||= do { my %lookups; foreach $_ (@{$self->values;}) { my $key = &$canon($_); next if exists $lookups{$key}; $lookups{$key} = $_; } ; \%lookups }