blib/lib/Mo/option.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 11 | 11 | 100.0 |
branch | 3 | 4 | 75.0 |
condition | n/a | ||
subroutine | 3 | 3 | 100.0 |
pod | n/a | ||
total | 17 | 18 | 94.4 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package Mo::option;my$M="Mo::"; | ||||||
2 | $VERSION=0.39; | ||||||
3 | 4 | 50 | 4 | 28 | *{$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]}}}; | ||
1 | 100 | 2 | 4 | ||||
1 | 2 | 11 | |||||
2 | 8 | ||||||
2 | 10 | ||||||
2 | 3 | ||||||
2 | 10 | ||||||
2 | 16 | ||||||
2 | 14 | ||||||
2 | 10 | ||||||
2 | 6 |