blib/lib/Bif/Mo.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 118 | 146 | 80.8 |
branch | 34 | 34 | 100.0 |
condition | 10 | 15 | 66.6 |
subroutine | 28 | 28 | 100.0 |
pod | n/a | ||
total | 190 | 223 | 85.2 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package Bif::Mo; | ||||||
2 | |||||||
3 | #<<< do not perltidy | ||||||
4 | # use Mo qw/required build default is import/; | ||||||
5 | # The following line of code was produced from the previous line by | ||||||
6 | # Mo::Inline version 0.39 | ||||||
7 | 84 | 100 | 66 | 84 | 751 | no warnings;my$M=__PACKAGE__.'::';*{$M.Object::new}=sub{my$c=shift;my$s=bless{@_},$c;my%n=%{$c.::.':E'};map{$s->{$_}=$n{$_}->()if!exists$s->{$_}}keys%n;$s};*{$M.import}=sub{import warnings;$^H|=1538;my($P,%e,%o)=caller.'::';shift;eval"no Mo::$_",&{$M.$_.::e}($P,\%e,\%o,\@_)for@_;return if$e{M};%e=(extends,sub{eval"no $_[0]()";@{$P.ISA}=$_[0]},has,sub{my$n=shift;my$m=sub{$#_?$_[0]{$n}=$_[1]:$_[0]{$n}};@_=(default,@_)if!($#_%2);$m=$o{$_}->($m,$n,@_)for sort keys%o;*{$P.$n}=$m},%e,);*{$P.$_}=$e{$_}for keys%e;@{$P.ISA}=$M.Object};*{$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..$#_];if(!exists$a{$n}){require Carp;Carp::croak($n." required")}$s}}$m}};*{$M.'build::e'}=sub{my($P,$e)=@_;$e->{new}=sub{$c=shift;my$s=&{$M.Object::new}($c,@_);my@B;do{@B=($c.::BUILD,@B)}while($c)=@{$c.::ISA};exists&$_&&&$_($s)for@B;$s}};*{$M.'default::e'}=sub{my($P,$e,$o)=@_;$o->{default}=sub{my($m,$n,%a)=@_;exists$a{default}or return$m;my($d,$r)=$a{default};my$g='HASH'eq($r=ref$d)?sub{+{%$d}}:'ARRAY'eq$r?sub{[@$d]}:'CODE'eq$r?$d:sub{$d};my$i=exists$a{lazy}?$a{lazy}:!${$P.':N'};$i or ${$P.':E'}{$n}=$g and return$m;sub{$#_?$m->(@_):!exists$_[0]{$n}?$_[0]{$n}=$g->(@_):$m->(@_)}}};*{$M.'is::e'}=sub{my($P,$e,$o)=@_;$o->{is}=sub{my($m,$n,%a)=@_;$a{is}or return$m;sub{$#_&&$a{is}eq'ro'&&caller ne'Mo::coerce'?die$n.' is ro':$m->(@_)}}};my$i=\&import;*{$M.import}=sub{(@_==2 and not$_[1])?pop@_:@_==1?push@_,grep!/import/,@f:();goto&$i};@f=qw[required build default is import];use strict;use warnings; | |
83 | 100 | 66 | 84 | 179 | |||
83 | 100 | 66 | 84 | 28551 | |||
84 | 100 | 66 | 84 | 12337 | |||
48 | 100 | 66 | 83 | 101 | |||
48 | 100 | 48 | 37764 | ||||
84 | 100 | 48 | 11332 | ||||
48 | 100 | 48 | 114 | ||||
48 | 100 | 45 | 1250 | ||||
84 | 100 | 45 | 10604 | ||||
49 | 100 | 45 | 108 | ||||
49 | 100 | 45 | 1732 | ||||
83 | 100 | 45 | 26952 | ||||
0 | 100 | 42 | 0 | ||||
0 | 100 | 42 | 0 | ||||
48 | 100 | 42 | 14653 | ||||
0 | 100 | 41 | 0 | ||||
0 | 41 | 0 | |||||
48 | 41 | 14640 | |||||
0 | 41 | 0 | |||||
0 | 41 | 0 | |||||
48 | 41 | 14479 | |||||
0 | 40 | 0 | |||||
0 | 40 | 0 | |||||
45 | 40 | 15780 | |||||
1 | 40 | 3 | |||||
1 | 40 | 15 | |||||
45 | 1126 | 13927 | |||||
0 | 0 | ||||||
0 | 0 | ||||||
45 | 14210 | ||||||
0 | 0 | ||||||
0 | 0 | ||||||
45 | 13809 | ||||||
0 | 0 | ||||||
0 | 0 | ||||||
45 | 6070 | ||||||
39 | 101 | ||||||
39 | 433 | ||||||
42 | 14033 | ||||||
0 | 0 | ||||||
0 | 0 | ||||||
42 | 13128 | ||||||
0 | 0 | ||||||
0 | 0 | ||||||
42 | 12991 | ||||||
0 | 0 | ||||||
0 | 0 | ||||||
41 | 11464 | ||||||
3 | 7 | ||||||
3 | 33 | ||||||
41 | 2115 | ||||||
37 | 83 | ||||||
37 | 412 | ||||||
41 | 13610 | ||||||
0 | 0 | ||||||
0 | 0 | ||||||
41 | 12483 | ||||||
0 | 0 | ||||||
0 | 0 | ||||||
41 | 12149 | ||||||
1 | 1 | ||||||
1 | 13 | ||||||
41 | 11641 | ||||||
3 | 6 | ||||||
3 | 34 | ||||||
40 | 1579 | ||||||
36 | 75 | ||||||
36 | 403 | ||||||
40 | 13225 | ||||||
0 | 0 | ||||||
0 | 0 | ||||||
40 | 12177 | ||||||
0 | 0 | ||||||
0 | 0 | ||||||
40 | 11423 | ||||||
1 | 2 | ||||||
1 | 11 | ||||||
40 | 10942 | ||||||
3 | 7 | ||||||
3 | 33 | ||||||
1126 | 15013 | ||||||
600 | 4119 | ||||||
548 | 10722 | ||||||
746 | 4220 | ||||||
409 | 2047 | ||||||
510 | 2604 | ||||||
557 | 2626 | ||||||
470 | 3030 | ||||||
398 | 2854 | ||||||
714 | 4524 | ||||||
449 | 2382 | ||||||
398 | 2894 | ||||||
557 | 3889 | ||||||
555 | 2269 | ||||||
447 | 3233 | ||||||
438 | 2191 | ||||||
403 | 3057 | ||||||
399 | 2910 | ||||||
448 | 2573 | ||||||
386 | 1487 | ||||||
449 | 2337 | ||||||
393 | 1915 | ||||||
412 | 2597 | ||||||
395 | 2227 | ||||||
397 | 32905 | ||||||
436 | 14017 | ||||||
433 | 2888 | ||||||
374 | 2016 | ||||||
421 | 2615 | ||||||
366 | 1794 | ||||||
447 | 2724 | ||||||
373 | 1912 | ||||||
293 | 2403 | ||||||
305 | 1589 | ||||||
480 | 2335 | ||||||
441 | 2054 | ||||||
378 | 1331 | ||||||
350 | 2200 | ||||||
348 | 2059 | ||||||
326 | 1795 | ||||||
324 | 2011 | ||||||
346 | 2249 | ||||||
308 | 2262 | ||||||
284 | 2224 | ||||||
291 | 1528 | ||||||
313 | 2893 | ||||||
357 | 1932 | ||||||
363 | 3616 | ||||||
406 | 2254 | ||||||
448 | 2106 | ||||||
410 | 1703 | ||||||
384 | 3407 | ||||||
329 | 1306 | ||||||
446 | 3353 | ||||||
314 | 1135 | ||||||
368 | 3630 | ||||||
325 | 1310 | ||||||
311 | 3195 | ||||||
257 | 1829 | ||||||
261 | 1074 | ||||||
310 | 4064 | ||||||
226 | 1074 | ||||||
295 | 5785 | ||||||
212 | 973 | ||||||
269 | 8506 | ||||||
8 | 1; | ||||||
9 | #>>> | ||||||
10 | |||||||
11 | __END__ |