File Coverage

blib/lib/Pegex/CSV.pm
Criterion Covered Total %
statement 18 18 100.0
branch n/a
condition n/a
subroutine 6 6 100.0
pod 0 1 0.0
total 24 25 96.0


line stmt bran cond sub pod time code
1             package Pegex::CSV;
2             our $VERSION = '0.0.2';
3              
4 2     2   1918 use Pegex::Base;
  2         2065  
  2         14  
5              
6 2     2   3642 use Pegex::Parser;
  2         15992  
  2         57  
7 2     2   767 use Pegex::CSV::Grammar;
  2         6  
  2         16  
8 2     2   764 use Pegex::CSV::LoL;
  2         6  
  2         60  
9 2     2   1177 use Encode;
  2         16469  
  2         257  
10              
11             sub load {
12 10     10 0 370 my ($self, $csv) = @_;
13              
14 10         42 my $parser = Pegex::Parser->new(
15             grammar => Pegex::CSV::Grammar->new,
16             receiver => Pegex::CSV::LoL->new,
17             # debug => 1,
18             );
19              
20 10         1041 return $parser->parse(decode_utf8 $csv);
21             }
22              
23             1;