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 3 3 100.0
pod n/a
total 19 20 95.0


line stmt bran cond sub pod time code
1             package Mo::coerce;my$M="Mo::";
2             $VERSION=0.39;
3 3 100 50 5   7 *{$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   8   17  
  6     8   23  
  9         44  
  4         23  
  8         31  
  3         15  
  3         62  
  3         451  
  3         33  
  3         9