blib/lib/Mo/default.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 15 | 15 | 100.0 |
branch | 16 | 16 | 100.0 |
condition | 1 | 2 | 50.0 |
subroutine | 4 | 4 | 100.0 |
pod | n/a | ||
total | 36 | 37 | 97.3 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package Mo::default;my$M="Mo::"; | ||||||
2 | $VERSION=0.38; | ||||||
3 | 18 | 100 | 50 | 59 | 1173 | *{$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->(@_)}}}; | |
6 | 100 | 76 | 141 | ||||
25 | 100 | 75 | 70 | ||||
25 | 100 | 80 | 89 | ||||
20 | 100 | 39 | |||||
20 | 100 | 114 | |||||
7 | 100 | 68 | |||||
4 | 100 | 25 | |||||
4 | 25 | ||||||
21 | 51 | ||||||
19 | 59 | ||||||
21 | 67 | ||||||
2 | 24 | ||||||
19 | 154 | ||||||
43 | 6517 |