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 | 100 | 100 | 66 | 100 | 663 | 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; | |
99 | 100 | 66 | 100 | 158 | |||
99 | 100 | 66 | 100 | 29821 | |||
100 | 100 | 66 | 100 | 9568 | |||
57 | 100 | 66 | 99 | 99 | |||
57 | 100 | 57 | 39820 | ||||
100 | 100 | 57 | 7759 | ||||
57 | 100 | 57 | 103 | ||||
57 | 100 | 54 | 1351 | ||||
100 | 100 | 54 | 7937 | ||||
58 | 100 | 54 | 82 | ||||
58 | 100 | 54 | 2383 | ||||
99 | 100 | 54 | 20869 | ||||
0 | 100 | 51 | 0 | ||||
0 | 100 | 51 | 0 | ||||
57 | 100 | 51 | 10623 | ||||
0 | 100 | 50 | 0 | ||||
0 | 50 | 0 | |||||
57 | 50 | 10319 | |||||
0 | 50 | 0 | |||||
0 | 50 | 0 | |||||
57 | 50 | 11645 | |||||
0 | 49 | 0 | |||||
0 | 49 | 0 | |||||
54 | 49 | 12977 | |||||
1 | 49 | 3 | |||||
1 | 49 | 20 | |||||
54 | 1463 | 10051 | |||||
0 | 0 | ||||||
0 | 0 | ||||||
54 | 9595 | ||||||
0 | 0 | ||||||
0 | 0 | ||||||
54 | 9960 | ||||||
0 | 0 | ||||||
0 | 0 | ||||||
54 | 5099 | ||||||
48 | 199 | ||||||
48 | 540 | ||||||
51 | 10146 | ||||||
0 | 0 | ||||||
0 | 0 | ||||||
51 | 9081 | ||||||
0 | 0 | ||||||
0 | 0 | ||||||
51 | 9322 | ||||||
0 | 0 | ||||||
0 | 0 | ||||||
50 | 8285 | ||||||
3 | 3 | ||||||
3 | 33 | ||||||
50 | 1408 | ||||||
46 | 73 | ||||||
46 | 485 | ||||||
50 | 9881 | ||||||
0 | 0 | ||||||
0 | 0 | ||||||
50 | 8620 | ||||||
0 | 0 | ||||||
0 | 0 | ||||||
50 | 8737 | ||||||
1 | 2 | ||||||
1 | 10 | ||||||
50 | 8177 | ||||||
3 | 6 | ||||||
3 | 28 | ||||||
49 | 1123 | ||||||
45 | 81 | ||||||
45 | 481 | ||||||
49 | 10454 | ||||||
0 | 0 | ||||||
0 | 0 | ||||||
49 | 8433 | ||||||
0 | 0 | ||||||
0 | 0 | ||||||
49 | 8616 | ||||||
1 | 2 | ||||||
1 | 9 | ||||||
49 | 7999 | ||||||
3 | 5 | ||||||
3 | 32 | ||||||
1463 | 8309 | ||||||
938 | 8150 | ||||||
930 | 4976 | ||||||
847 | 4466 | ||||||
552 | 2109 | ||||||
733 | 2771 | ||||||
736 | 3163 | ||||||
584 | 3501 | ||||||
325 | 6402 | ||||||
494 | 2347 | ||||||
578 | 2519 | ||||||
432 | 2172 | ||||||
666 | 3992 | ||||||
623 | 2467 | ||||||
524 | 2598 | ||||||
744 | 5001 | ||||||
661 | 12550 | ||||||
514 | 3225 | ||||||
535 | 2926 | ||||||
508 | 2338 | ||||||
547 | 2787 | ||||||
552 | 2826 | ||||||
678 | 32284 | ||||||
448 | 1960 | ||||||
490 | 2598 | ||||||
457 | 2560 | ||||||
314 | 3786 | ||||||
331 | 1028 | ||||||
453 | 1774 | ||||||
453 | 2131 | ||||||
316 | 1839 | ||||||
392 | 2338 | ||||||
381 | 1341 | ||||||
367 | 2605 | ||||||
419 | 1729 | ||||||
388 | 2116 | ||||||
360 | 2469 | ||||||
341 | 1806 | ||||||
429 | 2221 | ||||||
445 | 2738 | ||||||
422 | 4187 | ||||||
463 | 2930 | ||||||
439 | 3529 | ||||||
489 | 2655 | ||||||
394 | 10346 | ||||||
455 | 2069 | ||||||
402 | 3165 | ||||||
398 | 3749 | ||||||
378 | 1253 | ||||||
412 | 4071 | ||||||
423 | 1628 | ||||||
464 | 5466 | ||||||
509 | 2107 | ||||||
432 | 3281 | ||||||
289 | 1803 | ||||||
390 | 2880 | ||||||
298 | 1202 | ||||||
323 | 2354 | ||||||
325 | 1974 | ||||||
369 | 1354 | ||||||
422 | 4075 | ||||||
296 | 1001 | ||||||
355 | 7215 | ||||||
294 | 1777 | ||||||
424 | 7397 | ||||||
8 | 1; | ||||||
9 | #>>> | ||||||
10 | |||||||
11 | __END__ |