File Coverage

blib/lib/PDF/Make/Extract.pm
Criterion Covered Total %
statement 17 17 100.0
branch n/a
condition 1 2 50.0
subroutine 5 5 100.0
pod 1 1 100.0
total 24 25 96.0


line stmt bran cond sub pod time code
1             package PDF::Make::Extract;
2              
3 43     43   1136 use strict;
  43         58  
  43         1331  
4 43     43   160 use warnings;
  43         52  
  43         2157  
5              
6             our $VERSION = '0.03';
7              
8 43     43   159 use PDF::Make ();
  43         59  
  43         458  
9 43     43   14754 use PDF::Make::Reader;
  43         98  
  43         3514  
10              
11             sub extract {
12 4     4 1 132161 my ($class, $parser, $page_index) = @_;
13 4   50     13 $page_index //= 0;
14              
15 4         248 $parser->parse;
16 4         1722 my $reader = PDF::Make::Reader->new($parser);
17              
18 4         2909 return $class->_extract_from_reader($reader, $page_index);
19             }
20              
21             1;
22              
23             __END__