File Coverage

blib/lib/Pegex/JSON.pm
Criterion Covered Total %
statement 15 15 100.0
branch n/a
condition n/a
subroutine 6 6 100.0
pod 0 1 0.0
total 21 22 95.4


line stmt bran cond sub pod time code
1             package Pegex::JSON;
2 3     3   39478 BEGIN { $ENV{PERL_PEGEX_AUTO_COMPILE} = 'Pegex::JSON::Grammar' }
3             our $VERSION = '0.27';
4              
5 3     3   2035 use Pegex::Base;
  3         6378  
  3         17  
6              
7 3     3   12436 use Pegex::Parser;
  3         47758  
  3         106  
8 3     3   2682 use Pegex::JSON::Grammar;
  3         13  
  3         27  
9 3     3   2231 use Pegex::JSON::Data;
  3         15  
  3         392  
10              
11             sub load {
12 18     18 0 2000 my ($self, $json) = @_;
13 18         118 Pegex::Parser->new(
14             grammar => Pegex::JSON::Grammar->new,
15             receiver => Pegex::JSON::Data->new,
16             # debug => 1,
17             )->parse($json);
18             }
19              
20             1;