Upped version numbers, cleaned up code, fixed my name.
[dbsrgits/SQL-Translator.git] / lib / SQL / Translator / Parser / DBI.pm
index 11fe7a1..139f84c 100644 (file)
@@ -1,9 +1,7 @@
 package SQL::Translator::Parser::DBI;
 
 # -------------------------------------------------------------------
-# $Id: DBI.pm,v 1.8 2006-03-09 19:25:47 cahille Exp $
-# -------------------------------------------------------------------
-# Copyright (C) 2002-4 SQLFairy Authors
+# Copyright (C) 2002-2009 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
@@ -121,7 +119,7 @@ query Oracle directly and skip the parsing of a text file, too.
 use strict;
 use DBI;
 use vars qw($VERSION @EXPORT);
-$VERSION = sprintf "%d.%02d", q$Revision: 1.8 $ =~ /(\d+)\.(\d+)/;
+$VERSION = '1.60';
 
 use constant DRIVERS => {
     mysql            => 'MySQL',
@@ -130,19 +128,14 @@ use constant DRIVERS => {
     pg               => 'PostgreSQL',
     sqlite           => 'SQLite',
     sybase           => 'Sybase',
+    pg               => 'PostgreSQL',
+    db2              => 'DB2',
 };
 
 use Exporter;
 
 use SQL::Translator::Utils qw(debug);
 
-use SQL::Translator::Parser::DBI::MySQL;
-use SQL::Translator::Parser::DBI::SQLServer;
-use SQL::Translator::Parser::DBI::SQLite;
-use SQL::Translator::Parser::DBI::Sybase;
-use SQL::Translator::Parser::DBI::PostgreSQL;
-use SQL::Translator::Parser::DBI::Oracle;
-
 use base qw(Exporter);
 @EXPORT = qw(parse);
 
@@ -177,11 +170,7 @@ sub parse {
     my $pkg     = "SQL::Translator::Parser::DBI::$driver";
     my $sub     = $pkg.'::parse';
 
-    #
-    # I can't get this to work.  I seem to have to have the "use"
-    # statements above.
-    #
-#    $tr->load( $pkg );
+    SQL::Translator::load( $pkg );
 
     eval {
         no strict 'refs';
@@ -202,7 +191,7 @@ sub parse {
 
 =head1 AUTHOR
 
-Ken Y. Clark E<lt>kclark@cpan.orgE<gt>.
+Ken Youens-Clark E<lt>kclark@cpan.orgE<gt>.
 
 =head1 SEE ALSO