File Coverage

blib/lib/Mo/coerce.pm
Criterion Covered Total %
statement 11 11 100.0
branch 4 4 100.0
condition 1 2 50.0
subroutine 4 4 100.0
pod n/a
total 20 21 95.2


line stmt bran cond sub pod time code
1             package Mo::coerce;my$M="Mo::";
2             $VERSION=0.38;
3 8 100 50 13   42 *{$M.'coerce::e'}=sub{my($P,$e,$o)=@_;$o->{coerce}=sub{my($m,$n,%a)=@_;$a{coerce}or return$m;sub{$#_?$m->($_[0],$a{coerce}->($_[1])):$m->(@_)}};my$C=$e->{new}||*{$M.Object::new}{CODE};$e->{new}=sub{my$s=$C->(@_);$s->$_($s->{$_})for keys%$s;$s}};
  3 100   3   631  
  3     3   30  
  3     3   10  
  1         5  
  1         9  
  4         20  
  3         8  
  3         15  
  6         19  
  6         32