xml-template.pl untested

filter: Statementstmt 0.0% 0 / 21 Branchbran n/a Conditioncond 0.0% 0 / 8 MC/DCmcdc n/a Subroutinesub 0.0% 0 / 5 Podpod n/a totaltotal 0.0% 0 / 34 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 #!/usr/bin/perl5.8.0
2  
3  
4 use strict;
5 use XML::Template;
6 use XML::Template::Config;
7 use XML::Template::Element::File::Load;
8 use XML::Template::Element::Block::Load;
9  
10  
11 my $path = $ENV{PATH_INFO} || 'index.xhtml';
12 $path =~ s[^/][];
13  
14 my $xmlt = XML::Template->new (
15 Load => [
16 XML::Template::Element::File::Load->new (
17 IncludePath => ['.', XML::Template::Config->admindir]),
18 XML::Template::Element::Block::Load->new (
19 StripPattern => '\/?([^\/]+)\..*$')
20 ],
21 ErrorTemplate => 'error.xhtml')
22 || XML::Template->handle_error ('Template', XML::Template->error ());
23 $xmlt->process ($path)
24 || print "Error: " . $xmlt->error () . "\n";