From: Brian O'Connor Date: Tue, 16 Nov 2004 09:15:36 +0000 (+0000) Subject: I needed to be able to pass in additional information to the templates (beyond the... X-Git-Tag: v0.11008~597 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2304f604779b32141b1d5b09bef2d7c169411a92;p=dbsrgits%2FSQL-Translator.git I needed to be able to pass in additional information to the templates (beyond the schema object) processed by this producer. Before it only passed one argument through to the template but now I pass all items in the template args hash. --- diff --git a/lib/SQL/Translator/Producer/TTSchema.pm b/lib/SQL/Translator/Producer/TTSchema.pm index 1e3cf08..29b1a9a 100644 --- a/lib/SQL/Translator/Producer/TTSchema.pm +++ b/lib/SQL/Translator/Producer/TTSchema.pm @@ -1,7 +1,7 @@ package SQL::Translator::Producer::TTSchema; # ------------------------------------------------------------------- -# $Id: TTSchema.pm,v 1.6 2004-10-26 00:00:41 kycl4rk Exp $ +# $Id: TTSchema.pm,v 1.7 2004-11-16 09:15:36 boconnor Exp $ # ------------------------------------------------------------------- # Copyright (C) 2002-4 SQLFairy Authors # @@ -93,7 +93,7 @@ limitless! use strict; use vars qw[ $DEBUG $VERSION @EXPORT_OK ]; -$VERSION = sprintf "%d.%02d", q$Revision: 1.6 $ =~ /(\d+)\.(\d+)/; +$VERSION = sprintf "%d.%02d", q$Revision: 1.7 $ =~ /(\d+)\.(\d+)/; $DEBUG = 0 unless defined $DEBUG; use Template; @@ -122,7 +122,7 @@ sub produce { $tt->process( $file, - { schema => $scma , %{ $args->{'ttargs'} || {} } }, + { schema => $scma , %{ $args || {} } }, \$out ) or die "Error processing template '$file': ".$tt->error;