File Coverage

blib/lib/Mo/coerce.pm
Criterion Covered Total %
statement 14 14 100.0
branch 4 4 100.0
condition 1 2 50.0
subroutine 4 4 100.0
pod n/a
total 23 24 95.8


line stmt bran cond sub pod time code
1             package Mo::coerce;
2             $Mo::coerce::VERSION = '0.40';my$M="Mo::";
3             $VERSION='0.40';
4 8 100 50 8   11 *{$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}};
  8 100   5   23  
  6     7   21  
  10     2   69  
  1         5  
  4         13  
  1         4  
  1         6  
  1         7  
  1         9  
  1         3  
  2         352  
  2         19  
  2         5