line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package PDF::Writer; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
2691
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
125
|
|
4
|
1
|
|
|
1
|
|
7
|
use warnings; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
615
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '0.06'; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our $Backend; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub import { |
11
|
1
|
|
|
1
|
|
11
|
my $class = shift; |
12
|
1
|
50
|
|
|
|
7
|
$Backend = shift if @_; |
13
|
1
|
50
|
33
|
|
|
2901
|
require "PDF/Writer/$Backend.pm" if $Backend && $Backend eq 'mock'; |
14
|
|
|
|
|
|
|
} |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub new { |
17
|
1
|
|
|
1
|
1
|
1215
|
my $class = shift; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
my $backend = $Backend || ( |
20
|
|
|
|
|
|
|
eval { require PDF::API2; 1 } ? 'pdfapi2' : |
21
|
1
|
|
33
|
|
|
5
|
eval { require pdflib_pl; 1 } ? 'pdflib' : undef |
22
|
|
|
|
|
|
|
); |
23
|
|
|
|
|
|
|
|
24
|
1
|
50
|
|
|
|
6
|
if ($backend) { |
25
|
1
|
|
|
|
|
8
|
require "PDF/Writer/$backend.pm"; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
else { |
28
|
0
|
|
|
|
|
0
|
die "No supported PDF backends found!"; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
1
|
|
|
|
|
3
|
$class .= "::$backend"; |
32
|
1
|
|
|
|
|
7
|
return $class->new(@_); |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
1; |
36
|
|
|
|
|
|
|
__END__ |