File Coverage

blib/lib/Template/Generate.pm
Criterion Covered Total %
statement 103 105 98.1
branch 28 34 82.3
condition 2 2 100.0
subroutine 11 11 100.0
pod 1 2 50.0
total 145 154 94.1


line stmt bran cond sub pod time code
1             # $File: //member/autrijus/Template-Generate/lib/Template/Generate.pm $ $Author: autrijus $
2             # $Revision: #9 $ $Change: 8169 $ $DateTime: 2003/09/18 06:21:31 $ vim: expandtab shiftwidth=4
3              
4             package Template::Generate;
5             $Template::Generate::VERSION = '0.04';
6              
7 1     1   880 use 5.006001;
  1         4  
  1         40  
8 1     1   5 use strict;
  1         3  
  1         30  
9 1     1   5 use warnings;
  1         2  
  1         417  
10             our $DEBUG;
11              
12             =head1 NAME
13              
14             Template::Generate - Generate TT2 templates from data and documents
15              
16             =head1 VERSION
17              
18             This document describes version 0.04 of Template::Generate, released
19             September 18, 2003.
20              
21             =head1 SYNOPSIS
22              
23             use Template::Generate;
24              
25             my $obj = Template::Generate->new;
26             my $template = $obj->generate(
27             {
28             first => 'Autrijus',
29             last => 'Tang',
30             score => 55,
31             } => "(Simon's Blog) Score: 55, Name: Autrijus Tang",
32             {
33             first => 'Simon',
34             last => 'Cozens',
35             score => 61,
36             } => "(Simon's Blog) Score: 61, Name: Simon Cozens",
37             );
38              
39             # "(Simon's Blog) Score: [% score %], Name: [% first %] [% last %]"
40             print $template;
41              
42             =head1 DESCRIPTION
43              
44             This module generates TT2 templates. It can take data structures and
45             rendered documents together, and deduce templates that could have
46             performed the transformation.
47              
48             It is a companion to B