| blib/lib/Object/Proto/Sugar.pm | |||
|---|---|---|---|
| Criterion | Covered | Total | % |
| condition | 57 | 68 | 83.8 |
| line | !l | l&&!r | l&&r | condition |
|---|---|---|---|---|
| 98 | 15 | 7 | 4 | ref $sp[-1] eq "HASH" and exists $sp[-1]{'default'} |
| 99 | 2 | 20 | 4 | $sp[0] && ref $sp[0] |
| 4 | 6 | 16 | not $sp[0] && ref $sp[0] and ($sp[0] || '') =~ /^(ro|rw|set)$/ | |
| 291 | 7 | 51 | 6 | not $ref2 and $ref1 ne "CODE" |
| 410 | 7 | 1 | 13 | $alias && $spec->{'accessor'} eq '1' |
| 414 | 125 | 0 | 4 | exists $spec->{'reader'} and not ref $spec->{'reader'} |
| 416 | 3 | 0 | 1 | $alias and $spec->{'reader'} eq 1 |
| 420 | 125 | 0 | 4 | exists $spec->{'writer'} and not ref $spec->{'writer'} |
| 422 | 3 | 0 | 1 | $alias and $spec->{'writer'} eq 1 |
| line | l | !l | condition |
|---|---|---|---|
| 99 | 20 | 2 | $sp[0] || '' |
| 192 | 3 | 4 | $accessor_aliases{$pkg} || '' |
| 260 | 2 | 47 | ref $spec->{'isa'} || '' |
| 288 | 54 | 20 | ref $spec->{'default'} || '' |
| line | l | !l&&r | !l&&!r | condition |
|---|---|---|---|---|
| 197 | 3 | 0 | 0 | $func_to_attr{$name} || $name |
| 259 | 46 | 3 | 80 | defined $spec->{'isa'} or defined $spec->{'coerce'} |
| 261 | 2 | 3 | 44 | $ref eq "CODE" or defined $spec->{'coerce'} |
| 268 | 2 | 2 | 0 | $spec->{'isa'} || sub { 1; } |
| 2 | 2 | 0 | $spec->{'coerce'} || sub { $_[0]; } | |
| 287 | 61 | 13 | 55 | exists $spec->{'default'} or exists $spec->{'builder'} |
| 289 | 13 | 51 | 10 | exists $spec->{'builder'} or $ref1 eq "CODE" |
| 291 | 7 | 51 | 0 | $ref2 eq "CODE" or $ref1 eq "CODE" |
| 390 | 1 | 1 | 127 | defined $spec->{'init_arg'} or defined $spec->{'arg'} |
| 391 | 1 | 1 | 0 | $spec->{'init_arg'} || $spec->{'arg'} |
| 398 | 1 | 0 | 128 | $spec->{'weak_ref'} or $spec->{'weak'} |