| blib/lib/Mo/required.pm | |||
|---|---|---|---|
| Criterion | Covered | Total | % |
| statement | 15 | 15 | 100.0 |
| branch | 4 | 4 | 100.0 |
| condition | 2 | 2 | 100.0 |
| subroutine | 4 | 4 | 100.0 |
| pod | n/a | ||
| total | 25 | 25 | 100.0 |
| line | stmt | bran | cond | sub | pod | time | code |
|---|---|---|---|---|---|---|---|
| 1 | package Mo::required; | ||||||
| 2 | $Mo::required::VERSION = '0.40';my$M="Mo::"; | ||||||
| 3 | $VERSION='0.40'; | ||||||
| 4 | 1 | 100 | 100 | 1 | 4 | *{$M.'required::e'}=sub{my($P,$e,$o)=@_;$o->{required}=sub{my($m,$n,%a)=@_;if($a{required}){my$C=*{$P."new"}{CODE}||*{$M.Object::new}{CODE};no warnings 'redefine';*{$P."new"}=sub{my$s=$C->(@_);my%a=@_[1..$#_];die$n." required"if!exists$a{$n};$s}}$m}}; | |
| 1 | 100 | 2 | 1 | ||||
| 1 | 7 | 107 | |||||
| 2 | 7 | 11 | |||||
| 2 | 50 | ||||||
| 4 | 7 | ||||||
| 4 | 10 | ||||||
| 3 | 3 | ||||||
| 3 | 8 | ||||||
| 3 | 23 | ||||||
| 7 | 436 | ||||||
| 6 | 14 | ||||||
| 6 | 27 | ||||||
| 5 | 6 | ||||||
| 4 | 7 |