Tab/WS crusade
[dbsrgits/SQL-Translator.git] / lib / SQL / Translator / Producer / Oracle.pm
index e0d805b..46a24a5 100644 (file)
@@ -1,23 +1,5 @@
 package SQL::Translator::Producer::Oracle;
 
-# -------------------------------------------------------------------
-# 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::Producer::Oracle - Oracle SQL producer
@@ -106,8 +88,9 @@ context the slash will be still there to ensure compatibility with SQLPlus.
 =cut
 
 use strict;
-use vars qw[ $VERSION $DEBUG $WARN ];
-$VERSION = '1.59';
+use warnings;
+our ( $DEBUG, $WARN );
+our $VERSION = '1.59';
 $DEBUG   = 0 unless defined $DEBUG;
 
 use SQL::Translator::Schema::Constants;
@@ -201,7 +184,6 @@ my %truncated;
 # Quote used to escape table, field, sequence and trigger names
 my $quote_char  = '"';
 
-# -------------------------------------------------------------------
 sub produce {
     my $translator     = shift;
     $DEBUG             = $translator->debug;
@@ -727,7 +709,7 @@ sub create_field {
           "CREATE OR REPLACE TRIGGER $trig_name\n".
           "BEFORE INSERT OR UPDATE ON $table_name_q\n".
           "FOR EACH ROW WHEN (new.$field_name_q IS NULL)\n".
-          "BEGIN \n".
+          "BEGIN\n".
           " SELECT sysdate INTO :new.$field_name_q FROM dual;\n".
           "END;\n";
 
@@ -764,7 +746,6 @@ sub create_view {
     return \@create;
 }
 
-# -------------------------------------------------------------------
 sub mk_name {
     my $basename      = shift || '';
     my $type          = shift || '';
@@ -805,7 +786,6 @@ sub mk_name {
 
 1;
 
-# -------------------------------------------------------------------
 sub quote {
   my ($name, $q) = @_;
   $q && $name ? "$quote_char$name$quote_char" : $name;