Condition Coverage

blib/lib/Eval/TypeTiny.pm
Criterion Covered Total %
condition 39 61 63.9


and 3 conditions

line !l l&&!r l&&r condition
101 0 21225 49790 $subname and not $already{$_[1]}++
122 0 0 0 require Error::TypeTiny and Error::TypeTiny::croak("Expected $library to be a type library, but it doesn't seem to be")
134 0 0 0 require Error::TypeTiny and Error::TypeTiny::croak("Cannot parameterize a non-existant type")
140 425 0 1 @_ && wantarray
192 119 0 31876 defined $args{'description'} and not $^P & 16
200 563 0 14879 $k =~ /^\$/ and &Scalar::Util::reftype($args{'environment'}{$k}) =~ /^(SCALAR|REF)$/
203 274 0 289 $k =~ /^\@/ and &Scalar::Util::reftype($args{'environment'}{$k}) eq "ARRAY"
206 266 1 7 $k =~ /^\%/ and &Scalar::Util::reftype($args{'environment'}{$k}) eq "HASH"
209 1 0 2 $k =~ /^\&/ and &Scalar::Util::reftype($args{'environment'}{$k}) eq "CODE"
231 31714 11 5 $alias and &ALIAS_IMPLEMENTATION() eq "tie"
251 31710 13 3 $alias and &ALIAS_IMPLEMENTATION() eq "Devel::LexAlias"
257 31710 13 3 $alias and &ALIAS_IMPLEMENTATION() eq "PadWalker"

or 2 conditions

line l !l condition
88 0 1 2 $opts->{'into'} ||= scalar caller
108 0 15418 $args{'post_method'} || ''
193 15297 16698 $args{'environment'} ||= {}

or 3 conditions

line l !l&&r !l&&!r condition
47 103 1 0 $implementation ||= _pick_alternative("if", $] ge "5.022", "perl", "needs", "Devel::LexAlias", "Devel::LexAlias", "needs", "PadWalker", "PadWalker", "if", 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.
121 2 1 423 $type ||= do {
172 0 14607 0 $args{'description'} || sprintf(q[exportable function '%s'], $qualified_name)
318 3 2 0 $tie ||= eval "no warnings qw(void once uninitialized numeric);\nuse Type::Tiny ();\n\n{\n\tpackage #\n\t\tEval::TypeTiny::_TieArray;\n\trequire Tie::Array;\n\tour \@ISA = qw( Tie::StdArray );\n\tsub TIEARRAY {\n\t\tmy \$class = shift;\n\t\tbless \$_[0] => \$class;\n\t}\n\tsub AUTOLOAD {\n\t\tmy \$self = shift;\n\t\tmy (\$method) = (our \$AUTOLOAD =~ /(\\w+)\$/);\n\t\tdefined tied(\@\$self) and return tied(\@\$self)->\$method(\@_);\n\t\trequire Carp;\n\t\tCarp::croak(qq[Can't call method \"\$method\" on an undefined value]) unless \$method eq 'DESTROY';\n\t}\n\tsub can {\n\t\tmy \$self = shift;\n\t\tmy \$code = \$self->SUPER::can(\@_)\n\t\t\t|| (defined tied(\@\$self) and tied(\@\$self)->can(\@_));\n\t\treturn \$code;\n\t}\n\t__PACKAGE__->Type::Tiny::_install_overloads(\n\t\tq[bool] => sub { !! tied \@{\$_[0]} },\n\t\tq[\"\"] => sub { '' . tied \@{\$_[0]} },\n\t\tq[0+] => sub { 0 + tied \@{\$_[0]} },\n\t);\n}\n{\n\tpackage #\n\t\tEval::TypeTiny::_TieHash;\n\trequire Tie::Hash;\n\tour \@ISA = qw( Tie::StdHash );\n\tsub TIEHASH {\n\t\tmy \$class = shift;\n\t\tbless \$_[0] => \$class;\n\t}\n\tsub AUTOLOAD {\n\t\tmy \$self = shift;\n\t\tmy (\$method) = (our \$AUTOLOAD =~ /(\\w+)\$/);\n\t\tdefined tied(%\$self) and return tied(%\$self)->\$method(\@_);\n\t\trequire Carp;\n\t\tCarp::croak(qq[Can't call method \"\$method\" on an undefined value]) unless \$method eq 'DESTROY';\n\t}\n\tsub can {\n\t\tmy \$self = shift;\n\t\tmy \$code = \$self->SUPER::can(\@_)\n\t\t\t|| (defined tied(%\$self) and tied(%\$self)->can(\@_));\n\t\treturn \$code;\n\t}\n\t__PACKAGE__->Type::Tiny::_install_overloads(\n\t\tq[bool] => sub { !! tied %{\$_[0]} },\n\t\tq[\"\"] => sub { '' . tied %{\$_[0]} },\n\t\tq[0+] => sub { 0 + tied %{\$_[0]} },\n\t);\n}\n{\n\tpackage #\n\t\tEval::TypeTiny::_TieScalar;\n\trequire Tie::Scalar;\n\tour \@ISA = qw( Tie::StdScalar );\n\tsub TIESCALAR {\n\t\tmy \$class = shift;\n\t\tbless \$_[0] => \$class;\n\t}\n\tsub AUTOLOAD {\n\t\tmy \$self = shift;\n\t\tmy (\$method) = (our \$AUTOLOAD =~ /(\\w+)\$/);\n\t\tdefined tied(\$\$self) and return tied(\$\$self)->\$method(\@_);\n\t\trequire Carp;\n\t\tCarp::croak(qq[Can't call method \"\$method\" on an undefined value]) unless \$method eq 'DESTROY';\n\t}\n\tsub can {\n\t\tmy \$self = shift;\n\t\tmy \$code = \$self->SUPER::can(\@_)\n\t\t\t|| (defined tied(\$\$self) and tied(\$\$self)->can(\@_));\n\t\treturn \$code;\n\t}\n\t__PACKAGE__->Type::Tiny::_install_overloads(\n\t\tq[bool] => sub { !! tied \${\$_[0]} },\n\t\tq[\"\"] => sub { '' . tied \${\$_[0]} },\n\t\tq[0+] => sub { 0 + tied \${\$_[0]} },\n\t);\n}\n\n1;\n"
0 0 0 $self->SUPER::can(@_) || defined tied @$self && tied(@$self)->can(@_)
0 1 2 $self->SUPER::can(@_) || defined tied $$self && tied($$self)->can(@_)