X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FSQL%2FTranslator%2FProducer%2FTT%2FBase.pm;h=4c03728a98b4a871d246f9c950cc636ba822e81f;hb=752a0ffc868171987b517d88376181c3997bbba9;hp=75338209ca044b2172028712fcc4fed5eaecd9df;hpb=44659089c28216f1984873bc4aa8641e2e0e3410;p=dbsrgits%2FSQL-Translator.git diff --git a/lib/SQL/Translator/Producer/TT/Base.pm b/lib/SQL/Translator/Producer/TT/Base.pm index 7533820..4c03728 100644 --- a/lib/SQL/Translator/Producer/TT/Base.pm +++ b/lib/SQL/Translator/Producer/TT/Base.pm @@ -1,23 +1,5 @@ package SQL::Translator::Producer::TT::Base; -# ------------------------------------------------------------------- -# Copyright (C) 2002-2009 SQLFairy Authors -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; version 2. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -# 02111-1307 USA -# ------------------------------------------------------------------- - =pod =head1 NAME @@ -28,9 +10,10 @@ class. =cut use strict; +use warnings; -use vars qw[ $VERSION @EXPORT_OK ]; -$VERSION = '1.59'; +our @EXPORT_OK; +our $VERSION = '1.61'; use Template; use Data::Dumper; @@ -149,8 +132,6 @@ sub tt_vars { () }; 1; -# ------------------------------------------------------------------- - =pod =head1 SYNOPSIS @@ -193,14 +174,14 @@ sub classes. # Convert produce call into an object method call sub produce { return __PACKAGE__->new( translator => shift )->run; }; -See L below for details. +See L below for details. The upshot of this is we can make new template producers by sub classing this base class, adding the above snippet and a template. The module also provides a number of hooks into the templating process, -see L for details. +see L for details. -See the L above for an example of creating a simple producer using +See the L above for an example of creating a simple producer using a single template stored in the producers DATA section. =head1 SUB CLASS HOOKS @@ -224,7 +205,7 @@ The template to use, return a file name or a scalar ref of TT source, or an L. See L