X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FSQL%2FTranslator%2FProducer%2FTT%2FBase.pm;h=3a6105cc5d6f7e0b68ea126c3b813683df464b46;hb=c0ec0e22d3f0e3852c00daac5ef5763010b410c3;hp=d540d0419e9464b92c3658ce52e99cabdd0c8e1c;hpb=f27f9229eaf8c5ce637bea1f99eb8f9bdb42799c;p=dbsrgits%2FSQL-Translator.git
diff --git a/lib/SQL/Translator/Producer/TT/Base.pm b/lib/SQL/Translator/Producer/TT/Base.pm
index d540d04..3a6105c 100644
--- a/lib/SQL/Translator/Producer/TT/Base.pm
+++ b/lib/SQL/Translator/Producer/TT/Base.pm
@@ -12,8 +12,8 @@ class.
use strict;
use warnings;
-use vars qw[ $VERSION @EXPORT_OK ];
-$VERSION = '1.59';
+our @EXPORT_OK;
+our $VERSION = '1.59';
use Template;
use Data::Dumper;
@@ -174,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
@@ -205,7 +205,7 @@ The template to use, return a file name or a scalar ref of TT
source, or an L. See L for details, as the return from
this is passed on to it's C method.
-The default implimentation uses the producer arg C as a filename to read
+The default implementation uses the producer arg C as a filename to read
the template from. If the arg isn't there it will look for a C<__DATA__> section
in the class, reading it as template source if found. Returns undef if both
these fail, causing the produce call to fail with a 'no template!' error.
@@ -215,13 +215,13 @@ these fail, causing the produce call to fail with a 'no template!' error.
sub tt_vars { ( foo => "bar" ); }
Return hash of template vars to use in the template. Nothing added here
-by default, but see L for the variables you get for free.
+by default, but see L for the variables you get for free.
=head2 tt_default_vars
Return a hash-ref of the default vars given to the template.
-You wouldn't normally over-ride this, just inherit the default implimentation,
-to get the C & C variables, then over-ride L to add
+You wouldn't normally over-ride this, just inherit the default implementation,
+to get the C & C variables, then over-ride L to add
your own.
The current default variables are:
@@ -243,7 +243,7 @@ The L object.
WARNING: This method is Experimental so may change!
Called with the L object and should return one (it
-doesn't have to be the same one) that will become the C varibale used
+doesn't have to be the same one) that will become the C variable used
in the template.
Gets called from tt_default_vars.
@@ -266,7 +266,7 @@ Return the L object.
=head2 schema
-Return the L we are translating. This is equivilent
+Return the L we are translating. This is equivalent
to C<< $tt_producer->translator->schema >>.
=head2 run
@@ -277,7 +277,7 @@ produced text.
=head2 args
Util wrapper method around C<< TT::Base->translator->producer_args >> for
-(mostley) readonly access to the producer args. How it works depends on the
+(mostly) readonly access to the producer args. How it works depends on the
number of arguments you give it and the context.
No args - Return hashref (the actual hash in Translator) or hash of args.
@@ -303,7 +303,7 @@ paths.
- Pass in template vars from the producer args and command line.
-- Merge in TT::Table.
+- Merge in L.
- Hooks to pre-process the schema and post-process the output.