| 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 | 744 | 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 | 203 | |||
| 83 | 100 | 66 | 84 | 28934 | |||
| 84 | 100 | 66 | 84 | 12159 | |||
| 48 | 100 | 66 | 83 | 108 | |||
| 48 | 100 | 48 | 38522 | ||||
| 84 | 100 | 48 | 11159 | ||||
| 48 | 100 | 48 | 109 | ||||
| 48 | 100 | 45 | 1121 | ||||
| 84 | 100 | 45 | 10879 | ||||
| 49 | 100 | 45 | 109 | ||||
| 49 | 100 | 45 | 1900 | ||||
| 83 | 100 | 45 | 26617 | ||||
| 0 | 100 | 42 | 0 | ||||
| 0 | 100 | 42 | 0 | ||||
| 48 | 100 | 42 | 15134 | ||||
| 0 | 100 | 41 | 0 | ||||
| 0 | 41 | 0 | |||||
| 48 | 41 | 14740 | |||||
| 0 | 41 | 0 | |||||
| 0 | 41 | 0 | |||||
| 48 | 41 | 14865 | |||||
| 0 | 40 | 0 | |||||
| 0 | 40 | 0 | |||||
| 45 | 40 | 15386 | |||||
| 1 | 40 | 3 | |||||
| 1 | 40 | 14 | |||||
| 45 | 1475 | 13801 | |||||
| 0 | 0 | ||||||
| 0 | 0 | ||||||
| 45 | 13910 | ||||||
| 0 | 0 | ||||||
| 0 | 0 | ||||||
| 45 | 13717 | ||||||
| 0 | 0 | ||||||
| 0 | 0 | ||||||
| 45 | 6029 | ||||||
| 39 | 95 | ||||||
| 39 | 437 | ||||||
| 42 | 13417 | ||||||
| 0 | 0 | ||||||
| 0 | 0 | ||||||
| 42 | 12877 | ||||||
| 0 | 0 | ||||||
| 0 | 0 | ||||||
| 42 | 12521 | ||||||
| 0 | 0 | ||||||
| 0 | 0 | ||||||
| 41 | 11365 | ||||||
| 3 | 7 | ||||||
| 3 | 33 | ||||||
| 41 | 1912 | ||||||
| 37 | 170 | ||||||
| 37 | 406 | ||||||
| 41 | 13599 | ||||||
| 0 | 0 | ||||||
| 0 | 0 | ||||||
| 41 | 12650 | ||||||
| 0 | 0 | ||||||
| 0 | 0 | ||||||
| 41 | 12489 | ||||||
| 1 | 7 | ||||||
| 1 | 11 | ||||||
| 41 | 11773 | ||||||
| 3 | 6 | ||||||
| 3 | 32 | ||||||
| 40 | 1517 | ||||||
| 36 | 72 | ||||||
| 36 | 443 | ||||||
| 40 | 13184 | ||||||
| 0 | 0 | ||||||
| 0 | 0 | ||||||
| 40 | 11891 | ||||||
| 0 | 0 | ||||||
| 0 | 0 | ||||||
| 40 | 11551 | ||||||
| 1 | 2 | ||||||
| 1 | 10 | ||||||
| 40 | 11091 | ||||||
| 3 | 6 | ||||||
| 3 | 34 | ||||||
| 1475 | 20152 | ||||||
| 682 | 12001 | ||||||
| 720 | 4989 | ||||||
| 626 | 5526 | ||||||
| 600 | 3571 | ||||||
| 504 | 4344 | ||||||
| 459 | 2560 | ||||||
| 551 | 18072 | ||||||
| 272 | 1938 | ||||||
| 303 | 2678 | ||||||
| 415 | 5371 | ||||||
| 343 | 2069 | ||||||
| 321 | 1942 | ||||||
| 460 | 2302 | ||||||
| 468 | 4208 | ||||||
| 440 | 3124 | ||||||
| 464 | 1959 | ||||||
| 449 | 2568 | ||||||
| 510 | 3808 | ||||||
| 392 | 2194 | ||||||
| 373 | 1986 | ||||||
| 417 | 2599 | ||||||
| 388 | 3338 | ||||||
| 235 | 2054 | ||||||
| 321 | 2202 | ||||||
| 370 | 2780 | ||||||
| 374 | 2200 | ||||||
| 411 | 1545 | ||||||
| 308 | 1474 | ||||||
| 304 | 1793 | ||||||
| 344 | 11981 | ||||||
| 359 | 1741 | ||||||
| 352 | 3416 | ||||||
| 456 | 3174 | ||||||
| 424 | 2681 | ||||||
| 483 | 3731 | ||||||
| 496 | 2232 | ||||||
| 451 | 3174 | ||||||
| 421 | 2630 | ||||||
| 340 | 2312 | ||||||
| 290 | 2686 | ||||||
| 345 | 1367 | ||||||
| 386 | 2254 | ||||||
| 346 | 1339 | ||||||
| 314 | 2079 | ||||||
| 336 | 1619 | ||||||
| 351 | 1902 | ||||||
| 380 | 2850 | ||||||
| 425 | 1525 | ||||||
| 361 | 2161 | ||||||
| 316 | 2220 | ||||||
| 329 | 30220 | ||||||
| 350 | 1503 | ||||||
| 447 | 2827 | ||||||
| 274 | 941 | ||||||
| 281 | 4534 | ||||||
| 242 | 1627 | ||||||
| 305 | 1555 | ||||||
| 263 | 2480 | ||||||
| 284 | 1154 | ||||||
| 315 | 3927 | ||||||
| 222 | 1054 | ||||||
| 306 | 4721 | ||||||
| 241 | 1172 | ||||||
| 334 | 7890 | ||||||
| 8 | 1; | ||||||
| 9 | #>>> | ||||||
| 10 | |||||||
| 11 | __END__ |