an argument with the translator object.
package SQL::Translator::Producer::ClassDBI;
# -------------------------------------------------------------------
-# $Id: ClassDBI.pm,v 1.13 2003-06-10 15:06:04 kycl4rk Exp $
+# $Id: ClassDBI.pm,v 1.14 2003-06-11 04:00:42 kycl4rk Exp $
# -------------------------------------------------------------------
# Copyright (C) 2003 Allen Day <allenday@ucla.edu>,
# Ying Zhang <zyolive@yahoo.com>
use strict;
use vars qw[ $VERSION $DEBUG ];
-$VERSION = sprintf "%d.%02d", q$Revision: 1.13 $ =~ /(\d+)\.(\d+)/;
+$VERSION = sprintf "%d.%02d", q$Revision: 1.14 $ =~ /(\d+)\.(\d+)/;
$DEBUG = 1 unless defined $DEBUG;
use SQL::Translator::Schema::Constants;
use Data::Dumper;
sub produce {
- my ($translator, $data) = @_;
- local $DEBUG = $translator->debug;
- my $no_comments = $translator->no_comments;
- my $schema = $translator->schema;
+ my $translator = shift;
+ local $DEBUG = $translator->debug;
+ my $no_comments = $translator->no_comments;
+ my $schema = $translator->schema;
my $create;
$create .= header_comment(__PACKAGE__, "# ") unless ($no_comments);
package SQL::Translator::Producer::MySQL;
# -------------------------------------------------------------------
-# $Id: MySQL.pm,v 1.21 2003-06-09 01:56:51 kycl4rk Exp $
+# $Id: MySQL.pm,v 1.22 2003-06-11 04:00:43 kycl4rk Exp $
# -------------------------------------------------------------------
# Copyright (C) 2003 Ken Y. Clark <kclark@cpan.org>,
# darren chamberlain <darren@cpan.org>,
use strict;
use vars qw[ $VERSION $DEBUG ];
-$VERSION = sprintf "%d.%02d", q$Revision: 1.21 $ =~ /(\d+)\.(\d+)/;
+$VERSION = sprintf "%d.%02d", q$Revision: 1.22 $ =~ /(\d+)\.(\d+)/;
$DEBUG = 0 unless defined $DEBUG;
use Data::Dumper;
);
sub produce {
- my ($translator, $data) = @_;
- local $DEBUG = $translator->debug;
- my $no_comments = $translator->no_comments;
- my $add_drop_table = $translator->add_drop_table;
- my $schema = $translator->schema;
+ my $translator = shift;
+ local $DEBUG = $translator->debug;
+ my $no_comments = $translator->no_comments;
+ my $add_drop_table = $translator->add_drop_table;
+ my $schema = $translator->schema;
debug("PKG: Beginning production\n");
package SQL::Translator::Producer::Oracle;
# -------------------------------------------------------------------
-# $Id: Oracle.pm,v 1.12 2003-06-09 02:19:41 kycl4rk Exp $
+# $Id: Oracle.pm,v 1.13 2003-06-11 04:00:43 kycl4rk Exp $
# -------------------------------------------------------------------
# Copyright (C) 2003 Ken Y. Clark <kclark@cpan.org>,
# darren chamberlain <darren@cpan.org>,
use strict;
use vars qw[ $VERSION $DEBUG $WARN ];
-$VERSION = sprintf "%d.%02d", q$Revision: 1.12 $ =~ /(\d+)\.(\d+)/;
+$VERSION = sprintf "%d.%02d", q$Revision: 1.13 $ =~ /(\d+)\.(\d+)/;
$DEBUG = 0 unless defined $DEBUG;
use SQL::Translator::Schema::Constants;
# -------------------------------------------------------------------
sub produce {
- my ( $translator, $data ) = @_;
- $DEBUG = $translator->debug;
- $WARN = $translator->show_warnings;
- my $no_comments = $translator->no_comments;
- my $add_drop_table = $translator->add_drop_table;
- my $schema = $translator->schema;
+ my $translator = shift;
+ $DEBUG = $translator->debug;
+ $WARN = $translator->show_warnings;
+ my $no_comments = $translator->no_comments;
+ my $add_drop_table = $translator->add_drop_table;
+ my $schema = $translator->schema;
my $output;
$output .= header_comment unless ($no_comments);
package SQL::Translator::Producer::PostgreSQL;
# -------------------------------------------------------------------
-# $Id: PostgreSQL.pm,v 1.9 2003-06-09 01:59:21 kycl4rk Exp $
+# $Id: PostgreSQL.pm,v 1.10 2003-06-11 04:00:43 kycl4rk Exp $
# -------------------------------------------------------------------
# Copyright (C) 2003 Ken Y. Clark <kclark@cpan.org>,
# darren chamberlain <darren@cpan.org>,
use strict;
use vars qw[ $DEBUG $WARN $VERSION ];
-$VERSION = sprintf "%d.%02d", q$Revision: 1.9 $ =~ /(\d+)\.(\d+)/;
+$VERSION = sprintf "%d.%02d", q$Revision: 1.10 $ =~ /(\d+)\.(\d+)/;
$DEBUG = 1 unless defined $DEBUG;
use SQL::Translator::Schema::Constants;
# -------------------------------------------------------------------
sub produce {
- my ( $translator, $data ) = @_;
- $DEBUG = $translator->debug;
- $WARN = $translator->show_warnings;
- my $no_comments = $translator->no_comments;
- my $add_drop_table = $translator->add_drop_table;
- my $schema = $translator->schema;
+ my $translator = shift;
+ $DEBUG = $translator->debug;
+ $WARN = $translator->show_warnings;
+ my $no_comments = $translator->no_comments;
+ my $add_drop_table = $translator->add_drop_table;
+ my $schema = $translator->schema;
my $output;
$output .= header_comment unless ($no_comments);
package SQL::Translator::Producer::SQLite;
# -------------------------------------------------------------------
-# $Id: SQLite.pm,v 1.4 2003-06-09 02:00:01 kycl4rk Exp $
+# $Id: SQLite.pm,v 1.5 2003-06-11 04:00:44 kycl4rk Exp $
# -------------------------------------------------------------------
# Copyright (C) 2003 Ken Y. Clark <kclark@cpan.org>,
# darren chamberlain <darren@cpan.org>,
use vars qw[ $VERSION $DEBUG $WARN ];
-$VERSION = sprintf "%d.%02d", q$Revision: 1.4 $ =~ /(\d+)\.(\d+)/;
+$VERSION = sprintf "%d.%02d", q$Revision: 1.5 $ =~ /(\d+)\.(\d+)/;
$DEBUG = 0 unless defined $DEBUG;
$WARN = 0 unless defined $WARN;
my %truncated;
sub produce {
- my ($translator, $data) = @_;
- local $DEBUG = $translator->debug;
- local $WARN = $translator->show_warnings;
- my $no_comments = $translator->no_comments;
- my $add_drop_table = $translator->add_drop_table;
- my $schema = $translator->schema;
+ my $translator = shift;
+ local $DEBUG = $translator->debug;
+ local $WARN = $translator->show_warnings;
+ my $no_comments = $translator->no_comments;
+ my $add_drop_table = $translator->add_drop_table;
+ my $schema = $translator->schema;
debug("PKG: Beginning production\n");
return $create;
}
-
# -------------------------------------------------------------------
sub mk_name {
my ($basename, $type, $scope, $critical) = @_;
package SQL::Translator::Producer::Sybase;
# -------------------------------------------------------------------
-# $Id: Sybase.pm,v 1.3 2003-06-09 02:00:41 kycl4rk Exp $
+# $Id: Sybase.pm,v 1.4 2003-06-11 04:00:44 kycl4rk Exp $
# -------------------------------------------------------------------
# Copyright (C) 2003 Ken Y. Clark <kclark@cpan.org>,
# darren chamberlain <darren@cpan.org>,
use strict;
use vars qw[ $DEBUG $WARN $VERSION ];
-$VERSION = sprintf "%d.%02d", q$Revision: 1.3 $ =~ /(\d+)\.(\d+)/;
+$VERSION = sprintf "%d.%02d", q$Revision: 1.4 $ =~ /(\d+)\.(\d+)/;
$DEBUG = 1 unless defined $DEBUG;
use Data::Dumper;
# -------------------------------------------------------------------
sub produce {
- my ( $translator, $data ) = @_;
- $DEBUG = $translator->debug;
- $WARN = $translator->show_warnings;
- my $no_comments = $translator->no_comments;
- my $add_drop_table = $translator->add_drop_table;
- my $schema = $translator->schema;
+ my $translator = shift;
+ $DEBUG = $translator->debug;
+ $WARN = $translator->show_warnings;
+ my $no_comments = $translator->no_comments;
+ my $add_drop_table = $translator->add_drop_table;
+ my $schema = $translator->schema;
my $output;
$output .= header_comment unless ($no_comments);
package SQL::Translator::Producer::XML;
# -------------------------------------------------------------------
-# $Id: XML.pm,v 1.9 2003-06-09 02:01:23 kycl4rk Exp $
+# $Id: XML.pm,v 1.10 2003-06-11 04:00:44 kycl4rk Exp $
# -------------------------------------------------------------------
# Copyright (C) 2003 Ken Y. Clark <kclark@cpan.org>,
# darren chamberlain <darren@cpan.org>,
use strict;
use vars qw[ $VERSION ];
-$VERSION = sprintf "%d.%02d", q$Revision: 1.9 $ =~ /(\d+)\.(\d+)/;
+$VERSION = sprintf "%d.%02d", q$Revision: 1.10 $ =~ /(\d+)\.(\d+)/;
use IO::Scalar;
use SQL::Translator::Utils qw(header_comment);
# -------------------------------------------------------------------
sub produce {
- my ( $translator, $data ) = @_;
- my $schema = $translator->schema;
- my $args = $translator->producer_args;
+ my $translator = shift;
+ my $schema = $translator->schema;
+ my $args = $translator->producer_args;
my $io = IO::Scalar->new;
my $xml = XML::Writer->new(