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.39;
3 1 100 100 1   8 *{$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   170  
  7     7   633  
  6         23  
  6         37  
  5         14  
  4         13  
  4         14  
  3         4  
  3         127  
  3         17  
  4         16  
  2         3  
  2         66