File Coverage

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;my$M="Mo::";
2             $VERSION=0.38;
3 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   7   2  
  1     4   134  
  7     2   985  
  6         24  
  6         36  
  5         13  
  4         10  
  4         12  
  3         4  
  3         11  
  3         9  
  4         14  
  2         4  
  2         52