Whitespace
[dbsrgits/SQL-Translator.git] / lib / SQL / Translator / Parser / DBI.pm
index e2cad9e..13d8d12 100644 (file)
@@ -1,5 +1,23 @@
 package SQL::Translator::Parser::DBI;
 
+# -------------------------------------------------------------------
+# 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
+# published by the Free Software Foundation; version 2.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+# 02111-1307  USA
+# -------------------------------------------------------------------
+
 =head1 NAME
 
 SQL::Translator::Parser::DBI - "parser" for DBI handles
@@ -9,7 +27,7 @@ SQL::Translator::Parser::DBI - "parser" for DBI handles
   use DBI;
   use SQL::Translator;
 
-  my $dbh = DBI->connect('dsn', 'user', 'pass', 
+  my $dbh = DBI->connect('dsn', 'user', 'pass',
       {
           RaiseError       => 1,
           FetchHashKeyName => 'NAME_lc',
@@ -36,8 +54,8 @@ Or:
 
 =head1 DESCRIPTION
 
-This parser accepts an open database handle (or the arguments to create 
-one) and queries the database directly for the information.  
+This parser accepts an open database handle (or the arguments to create
+one) and queries the database directly for the information.
 
 The following are acceptable arguments:
 
@@ -45,8 +63,8 @@ The following are acceptable arguments:
 
 =item * dbh
 
-An open DBI database handle.  NB:  Be sure to create the database with the 
-"FetchHashKeyName => 'NAME_lc'" option as all the DBI parsers expect 
+An open DBI database handle.  NB:  Be sure to create the database with the
+"FetchHashKeyName => 'NAME_lc'" option as all the DBI parsers expect
 lowercased column names.
 
 =item * dsn
@@ -67,7 +85,7 @@ There is no need to specify which type of database you are querying as
 this is determined automatically by inspecting $dbh->{'Driver'}{'Name'}.
 If a parser exists for your database, it will be used automatically;
 if not, the code will fail automatically (and you can write the parser
-and contribute it to the project!).  
+and contribute it to the project!).
 
 Currently parsers exist for the following databases:
 
@@ -135,13 +153,13 @@ sub parse {
 
     unless ( $dbh ) {
         die 'No DSN' unless $dsn;
-        $dbh = DBI->connect( $dsn, $db_user, $db_password, 
+        $dbh = DBI->connect( $dsn, $db_user, $db_password,
             {
                 FetchHashKeyName => 'NAME_lc',
                 LongReadLen      => 3000,
                 LongTruncOk      => 1,
                 RaiseError       => 1,
-            } 
+            }
         );
     }