line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Excel::Template::TT; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
25939
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
39
|
|
4
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
50
|
|
5
|
|
|
|
|
|
|
our $VERSION = '0.0.1'; |
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
2067
|
use File::Temp qw(tempfile); |
|
1
|
|
|
|
|
29709
|
|
|
1
|
|
|
|
|
74
|
|
8
|
1
|
|
|
1
|
|
5262
|
use Template; |
|
1
|
|
|
|
|
62207
|
|
|
1
|
|
|
|
|
41
|
|
9
|
|
|
|
|
|
|
|
10
|
1
|
|
|
1
|
|
14
|
use base qw(Excel::Template); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
833
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub parse_xml { |
13
|
0
|
|
|
0
|
0
|
|
my($self, $file) = @_; |
14
|
|
|
|
|
|
|
|
15
|
0
|
|
|
|
|
|
my($fh, $tempfile) = tempfile; |
16
|
|
|
|
|
|
|
|
17
|
0
|
|
0
|
|
|
|
my $tt = Template->new($self->{CONFIG} || {}); |
18
|
0
|
|
0
|
|
|
|
$tt->process( |
19
|
|
|
|
|
|
|
$file, |
20
|
|
|
|
|
|
|
$self->{VARS} || {}, |
21
|
|
|
|
|
|
|
$fh, |
22
|
|
|
|
|
|
|
); |
23
|
0
|
|
|
|
|
|
close $fh; |
24
|
|
|
|
|
|
|
|
25
|
0
|
|
|
|
|
|
$self->{tempfile} = $tempfile; |
26
|
|
|
|
|
|
|
|
27
|
0
|
|
|
|
|
|
$self->SUPER::parse_xml($tempfile); |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub DESTROY { |
31
|
0
|
|
|
0
|
|
|
my $self = shift; |
32
|
|
|
|
|
|
|
|
33
|
0
|
|
|
|
|
|
unlink $self->{tempfile}; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
1; |
37
|
|
|
|
|
|
|
__END__ |