blib/lib/Mo/default.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 15 | 15 | 100.0 |
branch | 16 | 16 | 100.0 |
condition | 1 | 2 | 50.0 |
subroutine | 7 | 7 | 100.0 |
pod | n/a | ||
total | 39 | 40 | 97.5 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package Mo::default;my$M="Mo::"; | ||||||
2 | $VERSION=0.39; | ||||||
3 | 29 | 100 | 50 | 70 | 801 | *{$M.'default::e'}=sub{my($P,$e,$o)=@_;$o->{default}=sub{my($m,$n,%a)=@_;exists$a{default}or return$m;my($d,$r)=$a{default};my$g='HASH'eq($r=ref$d)?sub{+{%$d}}:'ARRAY'eq$r?sub{[@$d]}:'CODE'eq$r?$d:sub{$d};my$i=exists$a{lazy}?$a{lazy}:!${$P.':N'};$i or ${$P.':E'}{$n}=$g and return$m;sub{$#_?$m->(@_):!exists$_[0]{$n}?$_[0]{$n}=$g->(@_):$m->(@_)}}}; | |
23 | 100 | 97 | 135 | ||||
26 | 100 | 90 | 49 | ||||
26 | 100 | 29 | 115 | ||||
13 | 100 | 29 | 58 | ||||
9 | 100 | 29 | 46 | ||||
3 | 100 | 29 | 16 | ||||
17 | 100 | 38 | |||||
16 | 40 | ||||||
23 | 48 | ||||||
7 | 37 | ||||||
22 | 144 | ||||||
30 | 3445 | ||||||
6 | 54 | ||||||
20 | 1108 |