From: Ken Youens-Clark Date: Tue, 9 Mar 2004 19:19:21 +0000 (+0000) Subject: Getting translator options. X-Git-Tag: v0.06~145 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=01fe35e0754a3254ee3829d8bf2ff2c5d238ce0c;p=dbsrgits%2FSQL-Translator.git Getting translator options. --- diff --git a/lib/SQL/Translator/Parser/YAML.pm b/lib/SQL/Translator/Parser/YAML.pm index 857eac8..6797c68 100644 --- a/lib/SQL/Translator/Parser/YAML.pm +++ b/lib/SQL/Translator/Parser/YAML.pm @@ -1,7 +1,7 @@ package SQL::Translator::Parser::YAML; # ------------------------------------------------------------------- -# $Id: YAML.pm,v 1.5 2004-02-09 22:23:40 kycl4rk Exp $ +# $Id: YAML.pm,v 1.6 2004-03-09 19:19:21 kycl4rk Exp $ # ------------------------------------------------------------------- # Copyright (C) 2002-4 SQLFairy Authors # @@ -22,7 +22,7 @@ package SQL::Translator::Parser::YAML; use strict; use vars qw($VERSION); -$VERSION = sprintf "%d.%02d", q$Revision: 1.5 $ =~ /(\d+)\.(\d+)/; +$VERSION = sprintf "%d.%02d", q$Revision: 1.6 $ =~ /(\d+)\.(\d+)/; use SQL::Translator::Schema; use SQL::Translator::Utils qw(header_comment); @@ -117,6 +117,18 @@ sub parse { $schema->add_procedure( %$tdata ) or die $schema->error; } + if ( my $tr_data = $data->{'translator'} ) { + $translator->add_drop_table( $tr_data->{'add_drop_table'} ); + $translator->filename( $tr_data->{'filename'} ); + $translator->no_comments( $tr_data->{'no_comments'} ); + $translator->parser_args( $tr_data->{'parser_args'} ); + $translator->producer_args( $tr_data->{'producer_args'} ); + $translator->parser_type( $tr_data->{'parser_type'} ); + $translator->producer_type( $tr_data->{'producer_type'} ); + $translator->show_warnings( $tr_data->{'show_warnings'} ); + $translator->trace( $tr_data->{'trace'} ); + } + return 1; }