blib/lib/Type/Tiny/Enum.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
condition | 27 | 41 | 65.8 |
line | !l | l&&!r | l&&r | condition |
---|---|---|---|---|
70 | 51 | 1 | 2 | defined $opts{'coercion'} and not ref $opts{'coercion'} |
52 | 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 | 285 | $xsub and not $Type::Tiny::AvoidCallbacks |
360 | 2 | 0 | 1 | defined $best and length $best >= length $possible |
421 | 54 | 2 | 26 | $self->{''} and scalar keys %$self == 1 |
line | l | !l | condition |
---|---|---|---|
412 | 12 | 72 | $ref->{$char} ||= {} |
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 | 7 | 0 | $_[0]{'constraint'} ||= $_[0]->_build_constraint |
128 | 0 | 7 | 0 | $base_name ||= $self->name |
211 | 54 | 10 | 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 { |