package SQL::Translator;
# ----------------------------------------------------------------------
-# $Id: Translator.pm,v 1.57 2004-04-22 19:59:46 kycl4rk Exp $
+# $Id: Translator.pm,v 1.58 2004-10-15 02:23:29 allenday Exp $
# ----------------------------------------------------------------------
# Copyright (C) 2002-4 The SQLFairy Authors
#
require 5.004;
$VERSION = '0.06';
-$REVISION = sprintf "%d.%02d", q$Revision: 1.57 $ =~ /(\d+)\.(\d+)/;
+$REVISION = sprintf "%d.%02d", q$Revision: 1.58 $ =~ /(\d+)\.(\d+)/;
$DEBUG = 0 unless defined $DEBUG;
$ERROR = "";
my $self = shift;
unless ( defined $self->{'schema'} ) {
- $self->{'schema'} = SQL::Translator::Schema->new;
+ $self->{'schema'} = SQL::Translator::Schema->new(
+ parser_args => $self->parser_args,
+ producer_args => $self->producer_args,
+ );
}
return $self->{'schema'};
package SQL::Translator::Schema;
# ----------------------------------------------------------------------
-# $Id: Schema.pm,v 1.16 2004-10-13 23:14:06 allenday Exp $
+# $Id: Schema.pm,v 1.17 2004-10-15 02:23:30 allenday Exp $
# ----------------------------------------------------------------------
# Copyright (C) 2002-4 SQLFairy Authors
#
use base 'Class::Base';
use vars qw[ $VERSION $TABLE_ORDER $VIEW_ORDER $TRIGGER_ORDER $PROC_ORDER ];
-$VERSION = sprintf "%d.%02d", q$Revision: 1.16 $ =~ /(\d+)\.(\d+)/;
+$VERSION = sprintf "%d.%02d", q$Revision: 1.17 $ =~ /(\d+)\.(\d+)/;
# ----------------------------------------------------------------------
sub init {
=cut
my ( $self, $config ) = @_;
- $self->params( $config, qw[ name database ] ) || return undef;
+ $self->params( $config, qw[ name database parser_args producer_args ] )
+ || return undef;
return $self;
}
return $self->{'name'} || '';
}
+=head2 parser_args
+
+=cut
+
+sub parser_args {
+ my $self = shift;
+ return $self->{'parser_args'};
+}
+
+=head2 producer_args
+
+=cut
+
+sub producer_args {
+ my $self = shift;
+ return $self->{'producer_args'};
+}
+
# ----------------------------------------------------------------------
sub DESTROY {
my $self = shift;