blib/lib/Excel/Template/TT.pm untested

filter: Statementstmt 0.0% 0 / 26 Branchbran n/a Conditioncond 0.0% 0 / 4 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 0.0% 0 / 7 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 41 CC 1 SCAR 6.9
CC
1
Cov
0%
parse_xml
2.0
DESTROY
2.0
BEGIN
2.0
CRAP 2.0
1 package Excel::Template::TT;
2  
3 use strict;
4 use warnings;
5 our $VERSION = '0.0.1';
6  
7 use File::Temp qw(tempfile);
8 use Template;
9  
10 use base qw(Excel::Template);
11  
12 sub parse_xml {
13 my($self, $file) = @_;
14  
15 my($fh, $tempfile) = tempfile;
16  
17 my $tt = Template->new($self->{CONFIG} || {});
18 $tt->process(
19 $file,
20 $self->{VARS} || {},
21 $fh,
22 );
23 close $fh;
24  
25 $self->{tempfile} = $tempfile;
26  
27 $self->SUPER::parse_xml($tempfile);
28 }
29  
30 sub DESTROY {
31 my $self = shift;
32  
33 unlink $self->{tempfile};
34 }
35  
36 1;
37 __END__