File Coverage

blib/lib/Pegex/Base.pm
Criterion Covered Total %
statement 217 365 59.4
branch 39 40 97.5
condition 10 13 76.9
subroutine 95 95 100.0
pod n/a
total 361 513 70.3


line stmt bran cond sub pod time code
1             package Pegex::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.40
5 11 100 66 11   55046 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;*{$M.'xxx::e'}=sub{my($P,$e)=@_;$e->{WWW}=sub{require XXX;XXX::WWW(@_)};$e->{XXX}=sub{require XXX;XXX::XXX(@_)};$e->{YYY}=sub{require XXX;XXX::YYY(@_)};$e->{ZZZ}=sub{require XXX;XXX::ZZZ(@_)}};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;
  11 100 100 11   23  
  11 100 100 11   9081  
  11 100 66 11   74  
  11 100 66 11   29  
  11 100   11   3963  
  11 100   11   76  
  11 100   11   22  
  11 100   11   1405  
  11 100   11   65  
  11 100   11   17  
  11 100   11   234  
  11 100   11   42  
  11 100   11   15  
  11 100   11   375  
  11 100   11   1503  
  0 100   11   0  
  0 50   11   0  
  11 100   11   1236  
  0 100   11   0  
  0     11   0  
  11     11   1261  
  0     11   0  
  0     11   0  
  11     11   1289  
  0     11   0  
  0     11   0  
  11     11   1252  
  0     11   0  
  0     11   0  
  11     11   1228  
  0     11   0  
  0     11   0  
  11     11   1490  
  1     11   2  
  1     10   9  
  11     10   1274  
  0     10   0  
  0     10   0  
  11     10   1261  
  0     10   0  
  0     10   0  
  11     10   1210  
  0     10   0  
  0     10   0  
  11     10   1191  
  0     10   0  
  0     10   0  
  11     10   1247  
  0     10   0  
  0     10   0  
  11     10   1268  
  0     10   0  
  0     10   0  
  11     10   1229  
  0     10   0  
  0     10   0  
  11     10   1214  
  0     10   0  
  0     10   0  
  11     10   1245  
  0     10   0  
  0     10   0  
  11     10   1203  
  0     10   0  
  0     10   0  
  11     10   1234  
  0     10   0  
  0     7   0  
  11     7   1363  
  0     7   0  
  0     7   0  
  11     7   1252  
  0     7   0  
  0     7   0  
  11     1   1229  
  0     1   0  
  0     1   0  
  11     1   1257  
  0     1   0  
  0     1   0  
  11     1   1243  
  0     1   0  
  0     1   0  
  11     1   1233  
  0     1   0  
  0     1   0  
  11     1   1283  
  0     1   0  
  0     1   0  
  11     1   1249  
  0     1   0  
  0     1   0  
  11     1   1273  
  0     2025   0  
  0         0  
  11         1320  
  0         0  
  0         0  
  11         1250  
  0         0  
  0         0  
  11         1215  
  0         0  
  0         0  
  10         2330  
  6         16  
  6         58  
  10         1140  
  0         0  
  0         0  
  10         1160  
  0         0  
  0         0  
  10         1158  
  0         0  
  0         0  
  10         1114  
  0         0  
  0         0  
  10         1110  
  0         0  
  0         0  
  10         1340  
  1         2  
  1         9  
  10         1158  
  0         0  
  0         0  
  10         1118  
  0         0  
  0         0  
  10         1120  
  0         0  
  0         0  
  10         1111  
  0         0  
  0         0  
  10         1106  
  0         0  
  0         0  
  10         948  
  2         3  
  2         18  
  10         1032  
  1         2  
  1         9  
  10         1162  
  0         0  
  0         0  
  10         1132  
  0         0  
  0         0  
  10         1132  
  0         0  
  0         0  
  10         1137  
  0         0  
  0         0  
  10         1124  
  0         0  
  0         0  
  10         486  
  6         10  
  6         55  
  10         1166  
  0         0  
  0         0  
  10         1184  
  0         0  
  0         0  
  10         1134  
  0         0  
  0         0  
  10         1107  
  0         0  
  0         0  
  10         1161  
  0         0  
  0         0  
  10         1569  
  2         6  
  2         16  
  10         1498  
  1         3  
  1         9  
  10         1137  
  0         0  
  0         0  
  10         1113  
  0         0  
  0         0  
  10         1106  
  0         0  
  0         0  
  10         1121  
  0         0  
  0         0  
  10         1267  
  0         0  
  0         0  
  10         1865  
  8         20  
  8         66  
  7         1021  
  1         3  
  1         8  
  7         837  
  0         0  
  0         0  
  7         787  
  0         0  
  0         0  
  7         808  
  0         0  
  0         0  
  7         685  
  1         2  
  1         9  
  7         1053  
  1         3  
  1         10  
  7         257  
  5         10  
  5         41  
  1         116  
  0         0  
  0         0  
  1         119  
  0         0  
  0         0  
  1         114  
  0         0  
  0         0  
  1         114  
  0         0  
  0         0  
  1         137  
  0         0  
  0         0  
  1         121  
  0         0  
  0         0  
  1         124  
  0         0  
  0         0  
  1         111  
  0         0  
  0         0  
  1         114  
  0         0  
  0         0  
  1         113  
  0         0  
  0         0  
  1         113  
  0         0  
  0         0  
  1         7  
  1         2  
  1         10  
  1         121  
  0         0  
  0         0  
  1         123  
  0         0  
  0         0  
  1         116  
  0         0  
  0         0  
  1         114  
  0         0  
  0         0  
  1         114  
  0         0  
  0         0  
  1         118  
  0         0  
  0         0  
  1         6  
  1         2  
  1         8  
  2025         9098  
  544         2123  
  520         2133  
  157         589  
  128         351  
  80         237  
  79         243  
  131         730  
  194         483  
  1297         4820  
  175         409  
  167         589  
  160         235  
  644         2881  
  88         217  
  82         40157  
  589         2083  
  139         1074  
  180         354  
  205         1091  
  220         748  
  204         509  
  161         840  
  179         446  
  172         939  
  126         343  
  90         231  
  42         103  
  49         145  
  73         124  
  113         298  
  142         367  
  98         300  
  100         354  
  134         277  
  117         525  
  166         420  
  152         837  
  105         314  
  115         1751  
  169         326  
  181         321  
  88         225  
  139         271  
  115         235  
  178         894  
  165         405  
  134         894  
  129         240  
  144         766  
  76         1201  
  121         772  
  167         923  
  131         352  
  112         1413  
  156         383  
  146         1139  
  98         1233  
  110         379  
  108         291  
  130         392  
  84         618  
  126         2016  
  152         512  
  148         2745  
  122         1155  
  138         841  
  120         1340  
  100         768  
  82         1275  
  100         237  
  97         1705  
  129         268  
  120         1712  
  101         551  
  117         404  
  114         519  
  105         394  
  118         1296  
  119         565  
  116         1404  
  112         386  
  112         2887  
6              
7             1;