Pegex/Module.pm

filter: Statementstmt 53.8% 7 / 13 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 33.3% 1 / 3 Podpod 0.0% 0 / 1 totaltotal 42.1% 8 / 19 CC 2 SCAR 13.2
CC
2
Cov
47%
parse
6.0
__ANON__
2.0
BEGIN
1.0
CRAP 3.8
« Pegex.pm ↑ Summary Pegex/Base.pm »
1 package Pegex::Module;
2 1 ▶use Pegex::Base;
Subroutine BEGIN: called CC=1 SCAR=0.0
3  
4 1 has parser_class => 'Pegex::Parser', lazy => 0;
5 has grammar_class => (
6 0 ▶ default => sub {
Subroutine __ANON__: not called CC=1 SCAR=6.9
7 0 my $class = ref($_[0]);
8 0 die "$class needs a 'grammar_class' property";
9 },
10 1 );
11 1 has receiver_class => 'Pegex::Tree';
12  
13 0 ▶sub parse {
Subroutine parse: not called CC=2 SCAR=17.9
Pod undocumented
14 0 my ($self, $input) = @_;
15 0 ▶ $self = $self->new unless ref $self;
Branch: 1 branch
BranchTrueFalseTotal
unless ref $self 0 0 0
16 # use XXX; XXX $self;
17 0 my $parser = $self->parser_class->new(
18 grammar => $self->grammar_class->new,
19 receiver => $self->receiver_class->new,
20 );
21 0 $parser->parse($input);
22 }
23  
24 1 1;
« Pegex.pm ↑ Summary Pegex/Base.pm »