Condition Coverage

blib/lib/Type/Nano.pm
Criterion Covered Total %
condition 37 62 59.6


and 2 conditions

line l !l condition
173 6 4 $_->check($val) and return 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.

and 3 conditions

line !l l&&!r l&&r condition
95 6 17 0 not ref $_ and {1, 1, 0, 1, "", 1}->{$_}

or 2 conditions

line l !l condition
150 9 3 $obj->can($_) or return 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.
183 10 4 $_->check($val) or return 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.
214 54 0 $self->{'constraint'} ||= sub { 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. ; }

or 3 conditions

line l !l&&r !l&&!r condition
32 4 8 0 $Type::Nano::TYPES{'Any'} ||= "Type::Nano"->new("name", "Any", "constraint", sub { ; } )
40 2 8 0 $Type::Nano::TYPES{'Defined'} ||= "Type::Nano"->new("name", "Defined", "parent", &Any(), "constraint", sub { ; } )
48 0 1 0 $Type::Nano::TYPES{'Undef'} ||= "Type::Nano"->new("name", "Undef", "parent", &Any(), "constraint", sub { ; } )
56 5 5 0 $Type::Nano::TYPES{'Ref'} ||= "Type::Nano"->new("name", "Ref", "parent", &Defined(), "constraint", sub { ; } )
64 1 2 0 $Type::Nano::TYPES{'ArrayRef'} ||= "Type::Nano"->new("name", "ArrayRef", "parent", &Ref(), "constraint", sub { ; } )
72 1 2 0 $Type::Nano::TYPES{'HashRef'} ||= "Type::Nano"->new("name", "HashRef", "parent", &Ref(), "constraint", sub { ; } )
80 0 1 0 $Type::Nano::TYPES{'CodeRef'} ||= "Type::Nano"->new("name", "CodeRef", "parent", &Ref(), "constraint", sub { ; } )
88 0 4 0 $Type::Nano::TYPES{'Object'} ||= "Type::Nano"->new("name", "Object", "parent", &Ref(), "constraint", sub { ; } )
96 1 2 0 $Type::Nano::TYPES{'Bool'} ||= "Type::Nano"->new("name", "Bool", "parent", &Any(), "constraint", sub { ; } )
104 1 4 0 $Type::Nano::TYPES{'Str'} ||= "Type::Nano"->new("name", "Str", "parent", &Defined(), "constraint", sub { ; } )
112 1 3 0 $Type::Nano::TYPES{'Num'} ||= "Type::Nano"->new("name", "Num", "parent", &Str(), "constraint", sub { ; } )
120 1 3 0 $Type::Nano::TYPES{'Int'} ||= "Type::Nano"->new("name", "Int", "parent", &Num(), "constraint", sub { ; } )
129 0 1 0 $Type::Nano::TYPES{'CLASS'}{$class} ||= "Type::Nano"->new("name", $class, "parent", &Object(), "constraint", sub { $_->isa($class); } , "class", $class)
138 2 0 0 $_->can('DOES') || $_->can('isa')
139 0 1 0 $Type::Nano::TYPES{'ROLE'}{$role} ||= "Type::Nano"->new("name", $role, "parent", &Object(), "constraint", sub { my $meth = $_->can('DOES') || $_->can('isa'); $_->$meth($role); } , "role", $role)
151 2 1 0 $Type::Nano::TYPES{'DUCK'}{$methods} ||= "Type::Nano"->new("name", $name, "parent", &Object(), "constraint", sub { my $obj = $_; ($obj->can($_) or return 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. ) foreach (@methods); 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. ; } , "methods", \@methods)
164 1 1 0 $Type::Nano::TYPES{'ENUM'}{$values} ||= "Type::Nano"->new("name", $name, "parent", &Str(), "constraint", sub { $_ =~ /$regexp/; } , "values", \@values)