Condition Coverage

blib/lib/Type/Tiny.pm
Criterion Covered Total %
condition 195 293 66.5


and 2 conditions

line l !l condition
118 819 269 $ENV{$_} and ++$strict_mode
436 1687 483 0 &Scalar::Util::reftype($params{'my_methods'}{$_}) eq "CODE" and &Eval::TypeTiny::set_subname(sprintf("%s::my_%s", $self->qualified_name, $_), $params{'my_methods'}{$_})

and 3 conditions

line !l l&&!r l&&r condition
307 92981 0 227815 not exists $params{'definition_context'} and $level < 20
327 0 0 10710 &blessed($params{'parent'}) and $params{'parent'}->isa("Type::Tiny")
329 10704 3 3 $params{'parent'}->deprecated and not exists $params{'deprecated'}
334 44536 0 48445 exists $params{'constraint'} and defined $params{'constraint'}
44536 48368 77 exists $params{'constraint'} and defined $params{'constraint'} and not ref $params{'constraint'}
366 92973 5 2 exists $params{'coercion'} and not ref $params{'coercion'}
92978 0 2 exists $params{'coercion'} and not ref $params{'coercion'} and $params{'coercion'}
375 8682 44053 40245 not exists $params{'inlined'} and exists $params{'constraint'}
44053 75 40170 not exists $params{'inlined'} and exists $params{'constraint'} and !exists $params{'parent'} || $params{'parent'}->can_be_inlined
75 40164 6 not exists $params{'inlined'} and exists $params{'constraint'} and !exists $params{'parent'} || $params{'parent'}->can_be_inlined and $QFS ||= "Sub::Quote"->can("quoted_from_sub")
394 1 1 4 $perlstring and not $captures
563 9 0 497 $self->has_coercion and @{$self->coercion->type_coercion_map;}
605 0 1731 0 defined $_ and s/[\x00-\x1F]//gms
606 406 570 35 !ref($_) && /\W/
615 43815 5 2986 $self->_is_null_constraint and $self->has_parent
649 2755 200 716 $self->_is_null_constraint and $self->has_parent
681 0 0 1455 &blessed($A) and $A->isa("Type::Tiny")
682 0 0 1455 &blessed($B) and $B->isa("Type::Tiny")
778 0 0 12903 &blessed($self) and $self->isa("Type::Tiny")
779 0 0 12903 &blessed($other) and $other->isa("Type::Tiny")
785 0 0 12363 &blessed($self) and $self->isa("Type::Tiny")
786 0 0 12363 &blessed($other) and $other->isa("Type::Tiny")
795 0 0 2 &blessed($self) and $self->isa("Type::Tiny")
796 0 0 2 &blessed($other) and $other->isa("Type::Tiny")
803 0 0 2320 &blessed($self) and $self->isa("Type::Tiny")
804 0 0 2320 &blessed($other) and $other->isa("Type::Tiny")
813 19 0 11989 exists $self->{'library'} && $self->name ne '__ANON__'
909 353 0 101 $self->is_parameterized and $self->parent->has_deep_explanation
968 56147 88625 24587 $self->has_parent and $self->_is_null_constraint
970 88625 44401 11746 not $self->has_parent and $self->_is_null_constraint
980 5865 43377 11036 $self->has_parent and $self->_is_null_constraint
982 43377 1997 3868 not $self->has_parent and $self->_is_null_constraint
987 0 38811 6563 @r and not defined $r[0]
993 38059 7047 9836 /[;{}]/ && !/\Ado \{.+\}\z/
1053 1 53 360 defined $self and not ref $self
1129 34 966 362 defined $key and defined $param_cache{$key}
1153 0 3542 38 exists $options{$_} and not defined $options{$_}
3542 38 0 exists $options{$_} and not defined $options{$_} and delete $options{$_}
1241 0 0 0 $self->has_library and not $self->is_anon
1260 0 0 0 $self->has_library and not $self->is_anon
1311 11281 1 641 $self->has_coercion && $self->coercion->frozen
1335 0 80 16 &blessed($next) and $next->isa("Type::Coercion")
80 9 7 &blessed($next) and $next->isa("Type::Coercion") and $next->is_parameterized
0 80 9 &blessed($next) and $next->can("type_coercion_map")
1423 272355 0 0 $INC{'Moose.pm'} and ref $self
272355 0 0 $INC{'Moose.pm'} and ref $self and $_[0] =~ /^(?:Class::MOP|MooseX?::Meta)::(.+)$/
1438 272355 0 0 $INC{'Mouse.pm'} and ref $self
272355 0 0 $INC{'Mouse.pm'} and ref $self and $_[0] eq "Mouse::Meta::TypeConstraint"
1475 77834 1 0 $_[0] eq "type_parameter" and &blessed($_[0])
77835 0 0 $_[0] eq "type_parameter" and &blessed($_[0]) and $_[0]->has_parameters
1493 42070 6 1 $self->{'is_object'} and $object_methods{$_[0]}
1523 70 0 3 $self->{'is_object'} and $object_methods{$m}
1543 0 45 0 ref $self and $_[0] =~ /^ Type::API::Constraint (?: ::Coercible | ::Inlinable )? $/x
1546 45 0 0 not ref $self and $_[0] eq "Type::API::Constraint::Constructor"

or 2 conditions

line l !l condition
349 0 77 $params{'inlined'} ||= sub { my($type) = @_; my $inlined = $_ eq "\$_" ? "do { $code }" : "do { local \$_ = $_; $code }"; $type->has_parent ? (undef, $inlined) : $inlined; }
1056 0 414 delete $attrs{'exception_class'} || 'Error::TypeTiny::Assertion'
1281 521 11403 $tag ||= 0
1672 207 0 (shift())->parameters || []

or 3 conditions

line l !l&&r !l&&!r condition
252 0 1 0 $self->{'_overload_coderef'} ||= do { &Scalar::Util::weaken(my $weak = $self); sub { $weak->assert_return(@_); } }
274 1576 10307 0 $self->{'_overload_coderef'} ||= $self->can_be_inlined ? Eval::TypeTiny::eval_closure("source", sprintf("sub { %s }", $self->inline_assert("\$_[0]", undef, "no_wrapper", 1)), "description", sprintf("compiled assertion 'assert_%s'", $self)) : Eval::TypeTiny::eval_closure("source", sprintf("sub { %s }", $self->inline_assert("\$_[0]", "\$type", "no_wrapper", 1)), "description", sprintf("compiled assertion 'assert_%s'", $self), "environment", {"\$type", \$self})
308 227554 261 0 our $_TT_GUTS ||= do { my $g = join("|", map(quotemeta($_), grep((!/^Types::/), @InternalPackages))); qr/\A(?:$g)\z/o }
349 3 74 0 not exists $params{'parent'} or $params{'parent'}->can_be_inlined
363 10970 0 1 $params{'name'} =~ /^_{0,2}[A-Z][A-Za-z0-9_]+$/ms or eval " use 5.008; \$params{name} =~ /^_{0,2}\\p{Lu}[\\p{L}0-9_]+\$/sm "
375 40054 116 75 !exists $params{'parent'} || $params{'parent'}->can_be_inlined
5 1 40164 $QFS ||= "Sub::Quote"->can("quoted_from_sub")
515 33264 11040 0 $_[0]{'display_name'} ||= $_[0]->_build_display_name
517 399981 4011 0 $_[0]{'constraint'} ||= $_[0]->_build_constraint
520 80183 46316 0 $_[0]{'compiled_type_constraint'} ||= $_[0]->_build_compiled_check
522 5394 10694 0 $_[0]{'coercion'} ||= $_[0]->_build_coercion
529 661 207 0 $_[0]{'name_generator'} ||= $_[0]->_build_name_generator
532 0 0 0 $_[0]{'moose_type'} ||= $_[0]->_build_moose_type
533 0 0 0 $_[0]{'mouse_type'} ||= $_[0]->_build_mouse_type
535 1751 141 0 $_[0]{'my_methods'} ||= $_[0]->_build_my_methods
550 682 178 0 $_[0]{'_default_message'} ||= $_[0]->_build_default_message
773 173 50 307 $result eq 1 or $result eq 0
849 136412 480 0 $self->{'compiled_type_constraint'} ||= $self->_build_compiled_check
880 2 0 0 $self->{'compiled_type_constraint'} ||= $self->_build_compiled_check
930 5 7 0 $b ||= do { local $@; require B::Deparse; my $tmp = "B::Deparse"->new; $tmp->ambient_pragmas("strict", "all", "warnings", "all") if $tmp->can("ambient_pragmas"); $tmp }
948 74 7 0 $self->{'compiled_type_constraint'} ||= $self->_build_compiled_check
959 115082 1 0 $self->{'compiled_type_constraint'} ||= $self->_build_compiled_check
1107 3 0 1017 ref $_ eq 'SCALAR' || ref $_ eq 'REF'
1192 12 64 0 $self->{'complementary_type'} ||= $self->_build_complementary_type
1279 7 11916 0 $base_name ||= $self->name
1288 0 11403 521 $tag eq "types" or not $tag
1294 1 11403 520 $tag eq "is" or not $tag
1300 0 11403 521 $tag eq "assert" or not $tag
1311 520 11403 1 $tag eq "to" or not $tag
1499 0 34 2 $self->{'_util'}{$util} ||= eval { do { $self->_build_util($util) } }
1531 26 44 0 $self->{'_util'}{$util} ||= $self->_build_util($util)
1536 0 0 0 ref $self || $self
1560 5 5 72 $func eq "grep" or $func eq "first"
10 8 64 $func eq "grep" or $func eq "first" or $func eq "any"
13 9 55 $func eq "grep" or $func eq "first" or $func eq "any" or $func eq "all"
17 8 47 $func eq "grep" or $func eq "first" or $func eq "any" or $func eq "all" or $func eq "assert_any"
17 8 39 $func eq "grep" or $func eq "first" or $func eq "any" or $func eq "all" or $func eq "assert_any" or $func eq "assert_all"
1618 18 11 2 $func eq "sort" or $func eq "rsort"

xor 4 conditions

line l&&r l&&!r !l&&r !l&&!r condition
226 0 2 0 2 Deparse error: Can't locate object method "object_2svref" via package "B::SPECIAL" at /usr/local/lib/perl5/5.26.1/B/Deparse.pm line 5018. xor $_[2]