blib/lib/Mo/option.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 11 | 11 | 100.0 |
branch | 3 | 4 | 75.0 |
condition | n/a | ||
subroutine | 2 | 2 | 100.0 |
pod | n/a | ||
total | 16 | 17 | 94.1 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package Mo::option; | ||||||
2 | $Mo::option::VERSION = '0.40';my$M="Mo::"; | ||||||
3 | $VERSION='0.40'; | ||||||
4 | 2 | 100 | 2 | 9 | *{$M.'option::e'}=sub{my($P,$e,$o)=@_;$o->{option}=sub{my($m,$n,%a)=@_;$a{option}or return$m;my$n2=$n;*{$P."read_$n2"}=sub{$_[0]->{$n2}};sub{$#_?$m->(@_):$m->(@_,1);$_[0]}}}; | ||
2 | 50 | 2 | 3 | ||||
2 | 5 | ||||||
2 | 6 | ||||||
2 | 3 | ||||||
2 | 4 | ||||||
2 | 11 | ||||||
4 | 20 | ||||||
2 | 8 | ||||||
1 | 2 | ||||||
1 | 5 |