Branch Coverage

blib/lib/Attribute/Lexical.pm
Criterion Covered Total %
branch 51 68 75.0


line true false branch
163 0 4 if (not @caller or $caller[3] =~ /::BEGIN\z/)
2 2 if ($caller[3] eq 'attributes::import')
2 0 if (defined $ident and defined(my $handler = 'Attribute::Lexical'->handler_for_caller(\@caller, "${type}:$ident"))) { }
2 0 unless @unhandled
0 0 if ($next) { }
0 92 if (not @caller or $caller[3] =~ /::BEGIN\z/)
46 46 if ($caller[3] eq 'attributes::import')
37 16 if (defined $ident and defined(my $handler = 'Attribute::Lexical'->handler_for_caller(\@caller, "${type}:$ident"))) { }
32 14 unless @unhandled
5 9 if ($next) { }
0 4 if (not @caller or $caller[3] =~ /::BEGIN\z/)
2 2 if ($caller[3] eq 'attributes::import')
2 0 if (defined $ident and defined(my $handler = 'Attribute::Lexical'->handler_for_caller(\@caller, "${type}:$ident"))) { }
2 0 unless @unhandled
0 0 if ($next) { }
0 18 if (not @caller or $caller[3] =~ /::BEGIN\z/)
9 9 if ($caller[3] eq 'attributes::import')
7 2 if (defined $ident and defined(my $handler = 'Attribute::Lexical'->handler_for_caller(\@caller, "${type}:$ident"))) { }
7 2 unless @unhandled
0 2 if ($next) { }
262 6 144 unless rand $_[0]
263 13 131 unless $_[0] =~ qr/\A (?:SCALAR|ARRAY|HASH|CODE): [A-Za-z_][0-9A-Za-z_]* \z/x
291 0 6 unless eval qq[ sub handler_for_caller {\n\tmy(\$class, \$caller, \$name) = \@_;\n\t_check_attribute_name(\$name);\n\tmy \$h = (\$caller->[10] || {})->{"Attribute::Lexical/\$name"};\n\treturn defined(\$h) ? \$interned_handler{\$h} : undef;\n} 1; ]
48 18 defined $h ? :
310 0 6 unless eval "\n\tsub handler { shift->handler_for_caller([caller(0)], \@_) }\n1; "
327 0 0 defined $h ? :
343 1 68 if @_ == 0
344 1 67 unless @_ % 2 == 0
350 1 56 unless rand $handler
372 1 16 if @_ == 0
377 4 4 rand $_[$i] ? :
379 2 6 unless exists $^H{$key}
380 4 2 if ($handler)
381 2 2 unless $interned_handler{$^H{$key}} == $handler