# vim: set ft=perl:
# -------------------------------------------------------------------
-# $Id: sqlt,v 1.14 2004-07-08 20:37:53 grommit Exp $
+# $Id: sqlt,v 1.15 2004-08-12 16:18:00 kycl4rk Exp $
# -------------------------------------------------------------------
# Copyright (C) 2002-4 SQLFairy Authors
#
-d|--debug Print debug info
-v|--validate Validate the schema
+ --version Show the version of SQL::Translator
--trace Print parser trace info
--show-warnings Print warnings to STDERR
use SQL::Translator;
use vars qw( $VERSION );
-$VERSION = sprintf "%d.%02d", q$Revision: 1.14 $ =~ /(\d+)\.(\d+)/;
+$VERSION = sprintf "%d.%02d", q$Revision: 1.15 $ =~ /(\d+)\.(\d+)/;
my $from; # the original database
my $to; # the destination database
my $dsn; # DBI parser
my $db_user; # DBI parser
my $db_password; # DBI parser
+my $show_version; # Show version and exit script
my $skip;
my $skiplike;
my $dumper_db_user;
'prefix:s' => \$prefix,
'indent:s' => \$indent,
'newlines!' => \$newlines,
+ 'version' => \$show_version,
) or pod2usage(2);
my @files = @ARGV; # source files
pod2usage(1) if $help;
+if ( $show_version ) {
+ print "SQL::Translator v", $SQL::Translator::VERSION, "\n";
+ exit(0);
+}
+
my $translator = SQL::Translator->new(
debug => $debug || 0,
trace => $trace || 0,