From: Gavin Shelley Date: Sun, 10 Mar 2013 21:13:54 +0000 (+0000) Subject: TTSchema doc fixes X-Git-Tag: v0.011017~4 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=dbsrgits%2FSQL-Translator.git;a=commitdiff_plain;h=0e5a4e938ce81167fce3fbf5a18c11f7922f4b31 TTSchema doc fixes --- diff --git a/Changes b/Changes index 65561e5..888da24 100644 --- a/Changes +++ b/Changes @@ -11,6 +11,7 @@ * Add SQL_TINYINT and SQL_BIGINT to the type map in SQL::Translator::Schema::Field * Add JSON parser and producer (Jon Jensen) +* Clean up TTSchema doc some (Gavin Shelley) # ---------------------------------------------------------- # 0.11016 2012-10-09 diff --git a/lib/SQL/Translator/Producer/TTSchema.pm b/lib/SQL/Translator/Producer/TTSchema.pm index 3b01147..5885d3b 100644 --- a/lib/SQL/Translator/Producer/TTSchema.pm +++ b/lib/SQL/Translator/Producer/TTSchema.pm @@ -18,12 +18,12 @@ SQL::Translator::Producer::TTSchema - ttfile => 'foo_template.tt', # Template file to use # Extra template variables - ttargs => { + tt_vars => { author => "Mr Foo", }, # Template config options - ttargs => { + tt_conf => { INCLUDE_PATH => '/foo/templates', }, }, @@ -34,7 +34,7 @@ SQL::Translator::Producer::TTSchema - Produces schema output using a given Template Tookit template. -It needs one additional producer_arg of C which is the file +It needs one additional producer arg of C which is the file name of the template to use. This template will be passed a variable called C, which is the C object created by the parser. You can then use it to walk the schema via the @@ -54,13 +54,15 @@ Here's a brief example of what the template could look like: See F for a more complete example. -The template will also get the set of extra variables given as a hashref via the -C producer arg. +The template will also get the set of extra variables given as a +hashref via the C producer arg. (Note that the old style of +passing this config in the C producer arg has been +deprecated). You can set any of the options used to initialize the Template object by -adding a tt_conf producer_arg. See Template Toolkit docs for details of +adding a C producer arg. See Template Toolkit docs for details of the options. -(Note that the old style of passing this config directly in the producer args +(Note that the old style of passing this config directly in the C producer args has been deprecated). @@ -68,8 +70,8 @@ has been deprecated). to => 'TT', producer_args => { ttfile => 'foo_template.tt', - ttargs => {}, - tt_conf = { + tt_vars => {}, + tt_conf => { INCLUDE_PATH => '/foo/templates/tt', INTERPOLATE => 1, }