-#!/usr/bin/perl -w
+#!/usr/bin/env perl
# vim: set ft=perl:
# -------------------------------------------------------------------
-# $Id: sqlt-diff-old,v 1.1 2007-10-24 10:55:44 schiffbruechige Exp $
-# -------------------------------------------------------------------
-# Copyright (C) 2002-4 The SQLFairy Authors
+# Copyright (C) 2002-2009 The SQLFairy Authors
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# -------------------------------------------------------------------
use strict;
+use warnings;
use Pod::Usage;
use Data::Dumper;
use SQL::Translator;
use SQL::Translator::Schema::Constants;
use vars qw( $VERSION );
-$VERSION = sprintf "%d.%02d", q$Revision: 1.1 $ =~ /(\d+)\.(\d+)/;
+$VERSION = '1.59';
my ( @input, $list, $help, $debug );
for my $arg ( @ARGV ) {
pod2usage(1) if $help;
pod2usage('Please specify only two schemas to diff') if scalar @input > 2;
+pod2usage('No input') if !@input;
+
+if ( my $interactive = -t STDIN && -t STDOUT ) {
+ print STDERR join("\n",
+ "sqlt-diff-old is deprecated. Please sqlt-diff, and tell us ",
+ "about any problems or patch SQL::Translator::Diff",
+ '',
+ );
+}
my $tr = SQL::Translator->new;
my @parsers = $tr->list_parsers;
}
}
-print STDERR "sqlt-diff-old is deprecated, please try and use sqlt-diff, and tell us about any problems or patch SQL::Translator::Diff\n";
-
if ( @diffs ) {
print join( "\n",
"-- Convert schema '$s2_name' to '$s1_name':\n", @diffs, "\n"
=head1 AUTHOR
-Ken Y. Clark E<lt>kclark@cpan.orgE<gt>.
+Ken Youens-Clark E<lt>kclark@cpan.orgE<gt>.
=head1 SEE ALSO