File Coverage

blib/lib/Pegex/Base.pm
Criterion Covered Total %
statement 217 365 59.4
branch 40 40 100.0
condition 10 15 66.6
subroutine 95 95 100.0
pod n/a
total 362 515 70.2


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   56295 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 66 11   27  
  11 100 66 11   8958  
  11 100 66 11   75  
  11 100 66 11   18  
  11 100   11   4010  
  11 100   11   68  
  11 100   11   22  
  11 100   11   1366  
  11 100   11   67  
  11 100   11   14  
  11 100   11   237  
  11 100   11   65  
  11 100   11   17  
  11 100   11   412  
  11 100   11   1855  
  0 100   11   0  
  0 100   11   0  
  11 100   11   1242  
  0 100   11   0  
  0     11   0  
  11     11   1220  
  0     11   0  
  0     11   0  
  11     11   1246  
  0     11   0  
  0     11   0  
  11     11   1235  
  0     11   0  
  0     11   0  
  11     11   1214  
  0     11   0  
  0     11   0  
  11     11   1494  
  1     11   3  
  1     10   9  
  11     10   1290  
  0     10   0  
  0     10   0  
  11     10   1230  
  0     10   0  
  0     10   0  
  11     10   1309  
  0     10   0  
  0     10   0  
  11     10   1206  
  0     10   0  
  0     10   0  
  11     10   1233  
  0     10   0  
  0     10   0  
  11     10   1295  
  0     10   0  
  0     10   0  
  11     10   1223  
  0     10   0  
  0     10   0  
  11     10   1251  
  0     10   0  
  0     10   0  
  11     10   1217  
  0     10   0  
  0     10   0  
  11     10   1259  
  0     10   0  
  0     10   0  
  11     10   1228  
  0     10   0  
  0     7   0  
  11     7   1401  
  0     7   0  
  0     7   0  
  11     7   1256  
  0     7   0  
  0     7   0  
  11     1   1278  
  0     1   0  
  0     1   0  
  11     1   1233  
  0     1   0  
  0     1   0  
  11     1   1231  
  0     1   0  
  0     1   0  
  11     1   1258  
  0     1   0  
  0     1   0  
  11     1   1292  
  0     1   0  
  0     1   0  
  11     1   1270  
  0     1   0  
  0     1   0  
  11     1   1246  
  0     1047   0  
  0         0  
  11         1258  
  0         0  
  0         0  
  11         1267  
  0         0  
  0         0  
  11         1239  
  0         0  
  0         0  
  10         2358  
  6         13  
  6         50  
  10         1198  
  0         0  
  0         0  
  10         1125  
  0         0  
  0         0  
  10         1120  
  0         0  
  0         0  
  10         1128  
  0         0  
  0         0  
  10         1128  
  0         0  
  0         0  
  10         1311  
  1         3  
  1         10  
  10         1156  
  0         0  
  0         0  
  10         1118  
  0         0  
  0         0  
  10         1154  
  0         0  
  0         0  
  10         1217  
  0         0  
  0         0  
  10         1146  
  0         0  
  0         0  
  10         884  
  2         3  
  2         18  
  10         1098  
  1         2  
  1         8  
  10         1126  
  0         0  
  0         0  
  10         1150  
  0         0  
  0         0  
  10         1144  
  0         0  
  0         0  
  10         1107  
  0         0  
  0         0  
  10         1108  
  0         0  
  0         0  
  10         531  
  6         11  
  6         53  
  10         1228  
  0         0  
  0         0  
  10         1160  
  0         0  
  0         0  
  10         1130  
  0         0  
  0         0  
  10         1187  
  0         0  
  0         0  
  10         1137  
  0         0  
  0         0  
  10         1530  
  2         4  
  2         17  
  10         1339  
  1         2  
  1         10  
  10         1132  
  0         0  
  0         0  
  10         1141  
  0         0  
  0         0  
  10         1136  
  0         0  
  0         0  
  10         1112  
  0         0  
  0         0  
  10         1170  
  0         0  
  0         0  
  10         1901  
  8         19  
  8         63  
  7         1010  
  1         3  
  1         8  
  7         802  
  0         0  
  0         0  
  7         770  
  0         0  
  0         0  
  7         777  
  0         0  
  0         0  
  7         681  
  1         1  
  1         10  
  7         1035  
  1         3  
  1         9  
  7         259  
  5         7  
  5         43  
  1         108  
  0         0  
  0         0  
  1         119  
  0         0  
  0         0  
  1         106  
  0         0  
  0         0  
  1         105  
  0         0  
  0         0  
  1         115  
  0         0  
  0         0  
  1         112  
  0         0  
  0         0  
  1         111  
  0         0  
  0         0  
  1         103  
  0         0  
  0         0  
  1         106  
  0         0  
  0         0  
  1         105  
  0         0  
  0         0  
  1         110  
  0         0  
  0         0  
  1         6  
  1         2  
  1         10  
  1         112  
  0         0  
  0         0  
  1         106  
  0         0  
  0         0  
  1         107  
  0         0  
  0         0  
  1         108  
  0         0  
  0         0  
  1         105  
  0         0  
  0         0  
  1         109  
  0         0  
  0         0  
  1         6  
  1         2  
  1         8  
  1047         3799  
  120         233  
  74         159  
  127         548  
  137         361  
  157         398  
  1805         6660  
  91         573  
  119         263  
  1510         6627  
  111         997  
  625         2732  
  149         400  
  635         2268  
  106         702  
  134         341  
  148         278  
  150         820  
  123         233  
  110         355  
  108         627  
  144         408  
  94         350  
  122         964  
  120         1471  
  173         1061  
  211         592  
  137         41363  
  180         1087  
  183         589  
  157         444  
  133         351  
  105         377  
  100         350  
  121         421  
  97         696  
  146         732  
  211         437  
  180         351  
  159         431  
  75         284  
  90         231  
  100         197  
  101         916  
  104         1640  
  89         1006  
  78         182  
  138         918  
  88         780  
  100         214  
  122         774  
  115         251  
  136         861  
  125         260  
  100         1278  
  143         345  
  170         979  
  129         382  
  93         257  
  80         273  
  75         163  
  102         1115  
  148         385  
  101         940  
  152         1343  
  160         408  
  155         1287  
  155         959  
  102         249  
  165         1638  
  200         400  
  225         1836  
  128         233  
  130         2940  
  81         249  
  102         1232  
  85         174  
  117         866  
  115         1541  
  118         380  
  115         1573  
  103         293  
  102         2918  
6              
7             1;