File Coverage

blib/lib/Lingy/Base.pm
Criterion Covered Total %
statement 199 524 37.9
branch 15 40 37.5
condition 2 12 16.6
subroutine 146 147 99.3
pod n/a
total 362 723 50.0


line stmt bran cond sub pod time code
1             package Lingy::Base;
2             # use Mo qw'build default builder xxx import nonlazy required';
3             # The following line of code was produced from the previous line by
4             # Mo::Inline version 0.39
5 1 0 0 1   13 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.'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.'builder::e'}=sub{my($P,$e,$o)=@_;$o->{builder}=sub{my($m,$n,%a)=@_;my$b=$a{builder}or return$m;my$i=exists$a{lazy}?$a{lazy}:!${$P.':N'};$i or ${$P.':E'}{$n}=\&{$P.$b}and return$m;sub{$#_?$m->(@_):!exists$_[0]{$n}?$_[0]{$n}=$_[0]->$b:$m->(@_)}}};use constant XXX_skip=>1;my$dm='YAML::XS';*{$M.'xxx::e'}=sub{my($P,$e)=@_;$e->{WWW}=sub{require XXX;local$XXX::DumpModule=$dm;XXX::WWW(@_)};$e->{XXX}=sub{require XXX;local$XXX::DumpModule=$dm;XXX::XXX(@_)};$e->{YYY}=sub{require XXX;local$XXX::DumpModule=$dm;XXX::YYY(@_)};$e->{ZZZ}=sub{require XXX;local$XXX::DumpModule=$dm}};my$i=\&import;*{$M.import}=sub{(@_==2 and not$_[1])?pop@_:@_==1?push@_,grep!/import/,@f:();goto&$i};*{$M.'nonlazy::e'}=sub{${shift().':N'}=1};*{$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..$#_];die$n." required"if!exists$a{$n};$s}}$m}};@f=qw[build default builder xxx import nonlazy required];use strict;use warnings;
  1 100 0 1   1  
  1 50 33 1   845  
  1 0 50 1   6  
  1 0 0 1   0  
  1 0   1   315  
  1 0   1   5  
  1 50   1   1  
  1 50   1   122  
  1 100   1   7  
  1 50   1   1  
  1 100   1   45  
  1 100   1   6  
  1 50   1   2  
  1 50   1   47  
  1 0   1   164  
  0 0   1   0  
  0 0   1   0  
  1 0   1   162  
  0 50   1   0  
  0     1   0  
  1     1   143  
  0     1   0  
  0     1   0  
  1     1   216  
  0     1   0  
  0     1   0  
  1     1   172  
  0     1   0  
  0     1   0  
  1     1   148  
  0     1   0  
  0     1   0  
  1     1   262  
  0     1   0  
  0     1   0  
  1     1   146  
  0     1   0  
  0     1   0  
  1     1   150  
  0     1   0  
  0     1   0  
  1     1   148  
  0     1   0  
  0     1   0  
  1     1   147  
  0     1   0  
  0     1   0  
  1     1   182  
  0     1   0  
  0     1   0  
  1     1   156  
  0     1   0  
  0     1   0  
  1     1   215  
  0     1   0  
  0     1   0  
  1     1   312  
  0     1   0  
  0     1   0  
  1     1   161  
  0     1   0  
  0     1   0  
  1     1   148  
  0     1   0  
  0     1   0  
  1     1   198  
  0     1   0  
  0     1   0  
  1     1   151  
  0     1   0  
  0     1   0  
  1     1   184  
  0     1   0  
  0     1   0  
  1     1   206  
  0     1   0  
  0     1   0  
  1     1   167  
  0     1   0  
  0     1   0  
  1     1   152  
  0     1   0  
  0     1   0  
  1     1   145  
  0     1   0  
  0     1   0  
  1     1   197  
  0     1   0  
  0     1   0  
  1     1   149  
  0     1   0  
  0     1   0  
  1     1   148  
  0     1   0  
  0     1   0  
  1     1   143  
  0     1   0  
  0     1   0  
  1     1   144  
  0     1   0  
  0     1   0  
  1     1   207  
  0     1   0  
  0     1   0  
  1     1   156  
  0     1   0  
  0     1   0  
  1     1   147  
  0     1   0  
  0     1   0  
  1     1   143  
  0     1   0  
  0     1   0  
  1     1   210  
  0     1   0  
  0     1   0  
  1     1   146  
  0     1   0  
  0     1   0  
  1     1   166  
  0     1   0  
  0     1   0  
  1     1   185  
  0     1   0  
  0     1   0  
  1     1   219  
  0     1   0  
  0     1   0  
  1     1   144  
  0     1   0  
  0     1   0  
  1     1   144  
  0     1   0  
  0     1   0  
  1     1   149  
  0     1   0  
  0     1   0  
  1     1   145  
  0     1   0  
  0     1   0  
  1     1   152  
  0     1   0  
  0     1   0  
  1     1   144  
  0     1   0  
  0     0   0  
  1         146  
  0         0  
  0         0  
  1         152  
  0         0  
  0         0  
  1         167  
  0         0  
  0         0  
  1         149  
  0         0  
  0         0  
  1         154  
  0         0  
  0         0  
  1         149  
  0         0  
  0         0  
  1         189  
  0         0  
  0         0  
  1         147  
  0         0  
  0         0  
  1         166  
  0         0  
  0         0  
  1         179  
  0         0  
  0         0  
  1         198  
  0         0  
  0         0  
  1         148  
  0         0  
  0         0  
  1         148  
  0         0  
  0         0  
  1         150  
  0         0  
  0         0  
  1         151  
  0         0  
  0         0  
  1         177  
  0         0  
  0         0  
  1         151  
  0         0  
  0         0  
  1         171  
  0         0  
  0         0  
  1         149  
  0         0  
  0         0  
  1         189  
  0         0  
  0         0  
  1         145  
  0         0  
  0         0  
  1         145  
  0         0  
  0         0  
  1         158  
  0         0  
  0         0  
  1         193  
  0         0  
  0         0  
  1         186  
  0         0  
  0         0  
  1         144  
  0         0  
  0         0  
  1         176  
  0         0  
  0         0  
  1         189  
  0         0  
  0         0  
  1         151  
  0         0  
  0         0  
  1         153  
  0         0  
  0         0  
  1         144  
  0         0  
  0         0  
  1         189  
  0         0  
  0         0  
  1         159  
  0         0  
  0         0  
  1         149  
  0         0  
  0         0  
  1         173  
  0         0  
  0         0  
  1         175  
  0         0  
  0         0  
  1         147  
  0         0  
  0         0  
  1         148  
  0         0  
  0         0  
  1         147  
  0         0  
  0         0  
  1         149  
  0         0  
  0         0  
  1         191  
  0         0  
  0         0  
  1         153  
  0         0  
  0         0  
  1         180  
  0         0  
  0         0  
  1         147  
  0         0  
  0         0  
  1         189  
  0         0  
  0         0  
  1         149  
  0         0  
  0         0  
  1         156  
  0         0  
  0         0  
  1         148  
  0         0  
  0         0  
  1         188  
  0         0  
  0         0  
  1         149  
  0         0  
  0         0  
  1         145  
  0         0  
  0         0  
  1         143  
  0         0  
  0         0  
  1         205  
  0         0  
  0         0  
  1         148  
  0         0  
  0         0  
  1         166  
  0         0  
  0         0  
  1         148  
  0         0  
  0         0  
  1         150  
  0         0  
  0         0  
  1         186  
  0         0  
  0         0  
  1         158  
  0         0  
  0         0  
  1         154  
  0         0  
  0         0  
  1         194  
  0         0  
  0         0  
  1         145  
  0         0  
  0         0  
  1         145  
  0         0  
  0         0  
  1         144  
  0         0  
  0         0  
  1         196  
  0         0  
  0         0  
  1         146  
  0         0  
  0         0  
  1         146  
  0         0  
  0         0  
  1         149  
  0         0  
  0         0  
  1         153  
  0         0  
  0         0  
  1         186  
  0         0  
  0         0  
  1         264  
  0         0  
  0         0  
  1         207  
  0         0  
  0         0  
  1         173  
  0         0  
  0         0  
  1         155  
  0         0  
  0         0  
  1         162  
  0         0  
  0         0  
  1         149  
  0         0  
  0         0  
  1         151  
  0         0  
  0         0  
  1         155  
  0         0  
  0         0  
  1         146  
  0         0  
  0         0  
  1         144  
  0         0  
  0         0  
  1         185  
  0         0  
  0         0  
  1         149  
  0         0  
  0         0  
  1         154  
  0         0  
  0         0  
  1         176  
  0         0  
  0         0  
  1         152  
  0         0  
  0         0  
  1         145  
  0         0  
  0         0  
  1         148  
  0         0  
  0         0  
  1         151  
  0         0  
  0         0  
  1         184  
  0         0  
  0         0  
  1         5  
  1         2  
  1         8  
  1         158  
  0         0  
  0         0  
  1         162  
  0         0  
  0         0  
  1         149  
  0         0  
  0         0  
  1         144  
  0         0  
  0         0  
  1         144  
  0         0  
  0         0  
  1         164  
  0         0  
  0         0  
  1         4  
  1         2  
  1         8  
  0         0  
  0         0  
  0         0  
  24         31  
  24         57  
  0         0  
  24         70  
  24         98  
  24         27  
  24         103  
  9         455  
  9         19  
  9         126  
  0         0  
  0         0  
  0         0  
  0         0  
  0         0  
  0         0  
  0         0  
  0         0  
  0         0  
  0         0  
  0         0  
  0         0  
  24         34  
  24         84  
  0         0  
  0         0  
  0         0  
  0         0  
  0         0  
  0         0  
  0         0  
  0         0  
  0         0  
  0         0  
  0         0  
  0         0  
  22         30  
  22         89  
  22         55  
  22         49  
  22         1180  
  22         736  
  22         52  
  22         34  
  22         1235  
  24         61  
  24         58  
  12         16  
  12         54  
  0         0  
  0         0  
  0         0  
  12         19  
  12         39  
  12         18  
  12         80  
  0         0  
  0         0  
  0         0  
  0         0  
  0         0  
  0         0  
  0         0  
  0         0  
  0         0  
  22         37  
  22         1150  
  22         34  
  22         1167  
  22         27  
  22         1194  
  24         29  
  24         38  
  0         0  
  0         0  
  0         0  
  0         0  
  0         0  
  0         0  
  0         0  
  24         41  
  22         33  
  22         171  
6             1;