Condition Coverage

blib/lib/Type/Tiny.pm
Criterion Covered Total %
condition 201 300 67.0


and 2 conditions

line l !l condition
118 840 276 $ENV{$_} and ++$strict_mode
436 1771 507 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 93746 0 229201 not exists $params{'definition_context'} and $level < 20
327 0 0 11257 &blessed($params{'parent'}) and $params{'parent'}->isa("Type::Tiny")
329 11251 3 3 $params{'parent'}->deprecated and not exists $params{'deprecated'}
334 44746 0 49000 exists $params{'constraint'} and defined $params{'constraint'}
44746 48921 79 exists $params{'constraint'} and defined $params{'constraint'} and not ref $params{'constraint'}
366 93734 5 6 exists $params{'coercion'} and not ref $params{'coercion'}
93739 4 2 exists $params{'coercion'} and not ref $params{'coercion'} and $params{'coercion'}
375 9243 44239 40263 not exists $params{'inlined'} and exists $params{'constraint'}
44239 75 40188 not exists $params{'inlined'} and exists $params{'constraint'} and !exists $params{'parent'} || $params{'parent'}->can_be_inlined
75 40182 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
564 9 0 494 $self->has_coercion and @{$self->coercion->type_coercion_map;}
606 0 1737 0 defined $_ and s/[\x00-\x1F]//gms
607 409 570 35 !ref($_) && /\W/
616 44018 5 3134 $self->_is_null_constraint and $self->has_parent
657 2828 205 736 $self->_is_null_constraint and $self->has_parent
689 0 0 1477 &blessed($A) and $A->isa("Type::Tiny")
690 0 0 1477 &blessed($B) and $B->isa("Type::Tiny")
786 0 0 13040 &blessed($self) and $self->isa("Type::Tiny")
787 0 0 13040 &blessed($other) and $other->isa("Type::Tiny")
793 0 0 12500 &blessed($self) and $self->isa("Type::Tiny")
794 0 0 12500 &blessed($other) and $other->isa("Type::Tiny")
803 0 0 2 &blessed($self) and $self->isa("Type::Tiny")
804 0 0 2 &blessed($other) and $other->isa("Type::Tiny")
811 0 0 2341 &blessed($self) and $self->isa("Type::Tiny")
812 0 0 2341 &blessed($other) and $other->isa("Type::Tiny")
821 24 0 12765 exists $self->{'library'} && $self->name ne '__ANON__'
917 353 0 101 $self->is_parameterized and $self->parent->has_deep_explanation
976 57174 92534 25602 $self->has_parent and $self->_is_null_constraint
978 92534 44893 12281 not $self->has_parent and $self->_is_null_constraint
988 6328 45408 11457 $self->has_parent and $self->_is_null_constraint
990 45408 2291 4037 not $self->has_parent and $self->_is_null_constraint
995 0 40711 6988 @r and not defined $r[0]
1001 40094 7310 10433 /[;{}]/ && !/\Ado \{.+\}\z/
1061 1 55 361 defined $self and not ref $self
1137 34 970 362 defined $key and defined $param_cache{$key}
1161 0 3564 38 exists $options{$_} and not defined $options{$_}
3564 38 0 exists $options{$_} and not defined $options{$_} and delete $options{$_}
1249 0 0 0 $self->has_library and not $self->is_anon
1268 0 0 0 $self->has_library and not $self->is_anon
1319 12009 6 719 $self->has_coercion && $self->coercion->frozen
1343 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")
1431 273697 0 0 $INC{'Moose.pm'} and ref $self
273697 0 0 $INC{'Moose.pm'} and ref $self and $_[0] =~ /^(?:Class::MOP|MooseX?::Meta)::(.+)$/
1446 273697 0 0 $INC{'Mouse.pm'} and ref $self
273697 0 0 $INC{'Mouse.pm'} and ref $self and $_[0] eq "Mouse::Meta::TypeConstraint"
1483 79919 1 0 $_[0] eq "type_parameter" and &blessed($_[0])
79920 0 0 $_[0] eq "type_parameter" and &blessed($_[0]) and $_[0]->has_parameters
1501 42147 6 1 $self->{'is_object'} and $object_methods{$_[0]}
1531 71 0 3 $self->{'is_object'} and $object_methods{$m}
1551 0 45 0 ref $self and $_[0] =~ /^ Type::API::Constraint (?: ::Coercible | ::Inlinable )? $/x
1554 45 0 0 not ref $self and $_[0] eq "Type::API::Constraint::Constructor"

or 2 conditions

line l !l condition
349 0 79 $params{'inlined'} ||= sub { my($type) = @_; my $inlined = $_ eq "\$_" ? "do { $code }" : "do { local \$_ = $_; $code }"; $type->has_parent ? (undef, $inlined) : $inlined; }
1289 575 12160 $tag ||= 0
1680 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 1773 10890 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 228933 268 0 our $_TT_GUTS ||= do { my $g = join("|", map(quotemeta($_), grep((!/^Types::/), @InternalPackages))); qr/\A(?:$g)\z/o }
349 3 76 0 not exists $params{'parent'} or $params{'parent'}->can_be_inlined
363 11666 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 134 75 !exists $params{'parent'} || $params{'parent'}->can_be_inlined
5 1 40182 $QFS ||= "Sub::Quote"->can("quoted_from_sub")
515 34814 11643 0 $_[0]{'display_name'} ||= $_[0]->_build_display_name
517 412079 4207 0 $_[0]{'constraint'} ||= $_[0]->_build_constraint
520 82065 46651 0 $_[0]{'compiled_type_constraint'} ||= $_[0]->_build_compiled_check
522 5833 11274 0 $_[0]{'coercion'} ||= $_[0]->_build_coercion
529 662 210 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
537 10471 11153 0 $_[0]{'exception_class'} ||= $_[0]->_build_exception_class
551 682 181 0 $_[0]{'_default_message'} ||= $_[0]->_build_default_message
781 180 51 321 $result eq 1 or $result eq 0
857 136794 494 0 $self->{'compiled_type_constraint'} ||= $self->_build_compiled_check
888 2 0 0 $self->{'compiled_type_constraint'} ||= $self->_build_compiled_check
938 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 }
956 76 9 0 $self->{'compiled_type_constraint'} ||= $self->_build_compiled_check
967 115082 1 0 $self->{'compiled_type_constraint'} ||= $self->_build_compiled_check
1013 0 11058 0 $extras{'exception_class'} ||= $self->exception_class
1064 57 360 0 delete $attrs{'exception_class'} || (ref $self ? $self->exception_class : 'Error::TypeTiny::Assertion')
1115 3 0 1017 ref $_ eq 'SCALAR' || ref $_ eq 'REF'
1200 12 64 0 $self->{'complementary_type'} ||= $self->_build_complementary_type
1287 12 12722 0 $base_name ||= $self->name
1296 0 12160 575 $tag eq "types" or not $tag
1302 1 12160 574 $tag eq "is" or not $tag
1308 0 12160 575 $tag eq "assert" or not $tag
1319 574 12160 1 $tag eq "to" or not $tag
1507 0 34 2 $self->{'_util'}{$util} ||= eval { do { $self->_build_util($util) } }
1539 26 44 0 $self->{'_util'}{$util} ||= $self->_build_util($util)
1544 1 0 0 ref $self || $self
1568 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"
1626 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]