From: Arthur Axel 'fREW' Schmidt Date: Sat, 26 Feb 2011 08:14:48 +0000 (-0600) Subject: our > use vars X-Git-Tag: v0.11011~68 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0c04c5a2210135419771878dc7e341a1cba52cca;p=dbsrgits%2FSQL-Translator.git our > use vars --- diff --git a/lib/SQL/Translator.pm b/lib/SQL/Translator.pm index e9b6ed6..4169faf 100644 --- a/lib/SQL/Translator.pm +++ b/lib/SQL/Translator.pm @@ -2,12 +2,12 @@ package SQL::Translator; use strict; use warnings; -use vars qw( $VERSION $DEFAULT_SUB $DEBUG $ERROR ); +our ( $DEFAULT_SUB, $DEBUG, $ERROR ); use base 'Class::Base'; require 5.005; -$VERSION = '0.11010'; +our $VERSION = '0.11010'; $DEBUG = 0 unless defined $DEBUG; $ERROR = ""; diff --git a/lib/SQL/Translator/Filter/DefaultExtra.pm b/lib/SQL/Translator/Filter/DefaultExtra.pm index 6cd399f..4549d41 100644 --- a/lib/SQL/Translator/Filter/DefaultExtra.pm +++ b/lib/SQL/Translator/Filter/DefaultExtra.pm @@ -33,8 +33,7 @@ objects. use strict; use warnings; -use vars qw/$VERSION/; -$VERSION = '1.59'; +our $VERSION = '1.59'; sub filter { my $schema = shift; diff --git a/lib/SQL/Translator/Filter/Globals.pm b/lib/SQL/Translator/Filter/Globals.pm index 269ac5c..d4dbfda 100644 --- a/lib/SQL/Translator/Filter/Globals.pm +++ b/lib/SQL/Translator/Filter/Globals.pm @@ -38,8 +38,7 @@ SQL::Translator::Filter::Globals - Add global fields and indices to all tables. use strict; use warnings; -use vars qw/$VERSION/; -$VERSION = '1.59'; +our $VERSION = '1.59'; sub filter { my $schema = shift; diff --git a/lib/SQL/Translator/Filter/Names.pm b/lib/SQL/Translator/Filter/Names.pm index c5f9195..7643e6e 100644 --- a/lib/SQL/Translator/Filter/Names.pm +++ b/lib/SQL/Translator/Filter/Names.pm @@ -29,8 +29,7 @@ SQL::Translator::Filter::Names - Tweak the names of schema objects. use strict; use warnings; -use vars qw/$VERSION/; -$VERSION = '1.59'; +our $VERSION = '1.59'; sub filter { my $schema = shift; diff --git a/lib/SQL/Translator/Parser.pm b/lib/SQL/Translator/Parser.pm index 0307cd2..cb99418 100644 --- a/lib/SQL/Translator/Parser.pm +++ b/lib/SQL/Translator/Parser.pm @@ -2,8 +2,7 @@ package SQL::Translator::Parser; use strict; use warnings; -use vars qw( $VERSION ); -$VERSION = '1.60'; +our $VERSION = '1.60'; sub parse { "" } diff --git a/lib/SQL/Translator/Parser/Access.pm b/lib/SQL/Translator/Parser/Access.pm index 04de8c0..33621b1 100644 --- a/lib/SQL/Translator/Parser/Access.pm +++ b/lib/SQL/Translator/Parser/Access.pm @@ -21,8 +21,8 @@ something similar to the output of mdbtools (http://mdbtools.sourceforge.net/). use strict; use warnings; -use vars qw[ $DEBUG $VERSION $GRAMMAR @EXPORT_OK ]; -$VERSION = '1.59'; +our ( $DEBUG, $GRAMMAR, @EXPORT_OK ); +our $VERSION = '1.59'; $DEBUG = 0 unless defined $DEBUG; use Data::Dumper; diff --git a/lib/SQL/Translator/Parser/DBI.pm b/lib/SQL/Translator/Parser/DBI.pm index 05c95df..a653657 100644 --- a/lib/SQL/Translator/Parser/DBI.pm +++ b/lib/SQL/Translator/Parser/DBI.pm @@ -99,8 +99,8 @@ query Oracle directly and skip the parsing of a text file, too. use strict; use warnings; use DBI; -use vars qw($VERSION @EXPORT); -$VERSION = '1.59'; +our @EXPORT; +our $VERSION = '1.59'; use constant DRIVERS => { mysql => 'MySQL', diff --git a/lib/SQL/Translator/Parser/DBI/DB2.pm b/lib/SQL/Translator/Parser/DBI/DB2.pm index a434b18..2017928 100644 --- a/lib/SQL/Translator/Parser/DBI/DB2.pm +++ b/lib/SQL/Translator/Parser/DBI/DB2.pm @@ -22,7 +22,7 @@ use Data::Dumper; use SQL::Translator::Parser::DB2; use SQL::Translator::Schema::Constants; -use vars qw[ $DEBUG $VERSION @EXPORT_OK ]; +our ($DEBUG, $VERSION, @EXPORT_OK ); # $VERSION = '1.59'; $DEBUG = 0 unless defined $DEBUG; diff --git a/lib/SQL/Translator/Parser/DBI/MySQL.pm b/lib/SQL/Translator/Parser/DBI/MySQL.pm index 09570a6..8bd8a06 100644 --- a/lib/SQL/Translator/Parser/DBI/MySQL.pm +++ b/lib/SQL/Translator/Parser/DBI/MySQL.pm @@ -23,8 +23,8 @@ use Data::Dumper; use SQL::Translator::Schema::Constants; use SQL::Translator::Parser::MySQL; -use vars qw[ $DEBUG $VERSION @EXPORT_OK ]; -$VERSION = '1.59'; +our ( $DEBUG, @EXPORT_OK ); +our $VERSION = '1.59'; $DEBUG = 0 unless defined $DEBUG; sub parse { diff --git a/lib/SQL/Translator/Parser/DBI/PostgreSQL.pm b/lib/SQL/Translator/Parser/DBI/PostgreSQL.pm index 68df21a..d652f35 100644 --- a/lib/SQL/Translator/Parser/DBI/PostgreSQL.pm +++ b/lib/SQL/Translator/Parser/DBI/PostgreSQL.pm @@ -20,8 +20,8 @@ use DBI; use Data::Dumper; use SQL::Translator::Schema::Constants; -use vars qw[ $DEBUG $VERSION @EXPORT_OK ]; -$VERSION = '1.59'; +our ( $DEBUG, @EXPORT_OK ); +our $VERSION = '1.59'; $DEBUG = 0 unless defined $DEBUG; my $actions = {c => 'cascade', diff --git a/lib/SQL/Translator/Parser/DBI/SQLServer.pm b/lib/SQL/Translator/Parser/DBI/SQLServer.pm index 847f5a5..729b7ff 100644 --- a/lib/SQL/Translator/Parser/DBI/SQLServer.pm +++ b/lib/SQL/Translator/Parser/DBI/SQLServer.pm @@ -20,8 +20,8 @@ use DBI; use SQL::Translator::Schema; use Data::Dumper; -use vars qw[ $DEBUG $VERSION @EXPORT_OK ]; -$VERSION = '1.59'; +our ( $DEBUG, @EXPORT_OK ); +our $VERSION = '1.59'; $DEBUG = 0 unless defined $DEBUG; no strict 'refs'; diff --git a/lib/SQL/Translator/Parser/DBI/SQLite.pm b/lib/SQL/Translator/Parser/DBI/SQLite.pm index c76e485..6d475da 100644 --- a/lib/SQL/Translator/Parser/DBI/SQLite.pm +++ b/lib/SQL/Translator/Parser/DBI/SQLite.pm @@ -25,8 +25,8 @@ use DBI; use SQL::Translator::Parser::SQLite; use Data::Dumper; -use vars qw[ $DEBUG $VERSION @EXPORT_OK ]; -$VERSION = '1.59'; +our ( $DEBUG, @EXPORT_OK ); +our $VERSION = '1.59'; $DEBUG = 0 unless defined $DEBUG; sub parse { diff --git a/lib/SQL/Translator/Parser/DBI/Sybase.pm b/lib/SQL/Translator/Parser/DBI/Sybase.pm index b9931b3..708a080 100644 --- a/lib/SQL/Translator/Parser/DBI/Sybase.pm +++ b/lib/SQL/Translator/Parser/DBI/Sybase.pm @@ -20,8 +20,8 @@ use DBI; use SQL::Translator::Schema; use Data::Dumper; -use vars qw[ $DEBUG $VERSION @EXPORT_OK ]; -$VERSION = '1.59'; +our ( $DEBUG, @EXPORT_OK ); +our $VERSION = '1.59'; $DEBUG = 0 unless defined $DEBUG; no strict 'refs'; diff --git a/lib/SQL/Translator/Parser/Excel.pm b/lib/SQL/Translator/Parser/Excel.pm index 66b1145..846095a 100644 --- a/lib/SQL/Translator/Parser/Excel.pm +++ b/lib/SQL/Translator/Parser/Excel.pm @@ -30,9 +30,9 @@ and field sizes. True by default. use strict; use warnings; -use vars qw($DEBUG $VERSION @EXPORT_OK); +our ($DEBUG, @EXPORT_OK); $DEBUG = 0 unless defined $DEBUG; -$VERSION = '1.59'; +our $VERSION = '1.59'; use Spreadsheet::ParseExcel; use Exporter; diff --git a/lib/SQL/Translator/Parser/MySQL.pm b/lib/SQL/Translator/Parser/MySQL.pm index f498245..f997a1d 100644 --- a/lib/SQL/Translator/Parser/MySQL.pm +++ b/lib/SQL/Translator/Parser/MySQL.pm @@ -129,8 +129,8 @@ More information about the MySQL comment-syntax: Lkclark@cpan.orgE. use strict; use warnings; -use vars qw[ $VERSION $DEBUG ]; -$VERSION = '1.59'; +our $DEBUG; +our $VERSION = '1.59'; $DEBUG = 1 unless defined $DEBUG; use SQL::Translator::Parser::XML::SQLFairy; diff --git a/lib/SQL/Translator/Parser/XML/SQLFairy.pm b/lib/SQL/Translator/Parser/XML/SQLFairy.pm index eb5d023..fc128f1 100644 --- a/lib/SQL/Translator/Parser/XML/SQLFairy.pm +++ b/lib/SQL/Translator/Parser/XML/SQLFairy.pm @@ -78,8 +78,8 @@ To convert your old format files simply pass them through the translator :) use strict; use warnings; -use vars qw[ $DEBUG $VERSION @EXPORT_OK ]; -$VERSION = '1.59'; +our ( $DEBUG, @EXPORT_OK ); +our $VERSION = '1.59'; $DEBUG = 0 unless defined $DEBUG; use Data::Dumper; diff --git a/lib/SQL/Translator/Parser/YAML.pm b/lib/SQL/Translator/Parser/YAML.pm index 3ea5ba0..462ddcd 100644 --- a/lib/SQL/Translator/Parser/YAML.pm +++ b/lib/SQL/Translator/Parser/YAML.pm @@ -2,8 +2,7 @@ package SQL::Translator::Parser::YAML; use strict; use warnings; -use vars qw($VERSION); -$VERSION = '1.59'; +our $VERSION = '1.59'; use SQL::Translator::Schema; use SQL::Translator::Utils qw(header_comment); diff --git a/lib/SQL/Translator/Parser/xSV.pm b/lib/SQL/Translator/Parser/xSV.pm index edf0100..3e199b2 100644 --- a/lib/SQL/Translator/Parser/xSV.pm +++ b/lib/SQL/Translator/Parser/xSV.pm @@ -45,8 +45,8 @@ C. use strict; use warnings; -use vars qw($VERSION @EXPORT); -$VERSION = '1.59'; +our @EXPORT; +our $VERSION = '1.59'; use Exporter; use Text::ParseWords qw(quotewords); diff --git a/lib/SQL/Translator/Producer.pm b/lib/SQL/Translator/Producer.pm index 63a1597..ac6d5bd 100644 --- a/lib/SQL/Translator/Producer.pm +++ b/lib/SQL/Translator/Producer.pm @@ -2,9 +2,8 @@ package SQL::Translator::Producer; use strict; use warnings; -use vars qw($VERSION); use Scalar::Util (); -$VERSION = '1.59'; +our $VERSION = '1.59'; sub produce { "" } diff --git a/lib/SQL/Translator/Producer/ClassDBI.pm b/lib/SQL/Translator/Producer/ClassDBI.pm index b52f7fe..f7994c9 100644 --- a/lib/SQL/Translator/Producer/ClassDBI.pm +++ b/lib/SQL/Translator/Producer/ClassDBI.pm @@ -2,8 +2,8 @@ package SQL::Translator::Producer::ClassDBI; use strict; use warnings; -use vars qw[ $VERSION $DEBUG ]; -$VERSION = '1.59'; +our $DEBUG; +our $VERSION = '1.59'; $DEBUG = 1 unless defined $DEBUG; use SQL::Translator::Schema::Constants; diff --git a/lib/SQL/Translator/Producer/DB2.pm b/lib/SQL/Translator/Producer/DB2.pm index 1eb52d1..051877f 100644 --- a/lib/SQL/Translator/Producer/DB2.pm +++ b/lib/SQL/Translator/Producer/DB2.pm @@ -20,8 +20,8 @@ Creates an SQL DDL suitable for DB2. use warnings; use strict; use warnings; -use vars qw[ $VERSION $DEBUG $WARN ]; -$VERSION = '1.59'; +our ( $DEBUG, $WARN ); +our $VERSION = '1.59'; $DEBUG = 0 unless defined $DEBUG; use SQL::Translator::Schema::Constants; diff --git a/lib/SQL/Translator/Producer/DiaUml.pm b/lib/SQL/Translator/Producer/DiaUml.pm index 0eedb87..9c7fa96 100644 --- a/lib/SQL/Translator/Producer/DiaUml.pm +++ b/lib/SQL/Translator/Producer/DiaUml.pm @@ -37,8 +37,8 @@ automatically arrange them horizontally or vertically. use strict; use warnings; -use vars qw[ $DEBUG $VERSION @EXPORT_OK ]; -$VERSION = '1.59'; +our ( $DEBUG, @EXPORT_OK ); +our $VERSION = '1.59'; $DEBUG = 0 unless defined $DEBUG; use File::ShareDir qw/dist_dir/; diff --git a/lib/SQL/Translator/Producer/Diagram.pm b/lib/SQL/Translator/Producer/Diagram.pm index f7a06a2..08b6dd3 100644 --- a/lib/SQL/Translator/Producer/Diagram.pm +++ b/lib/SQL/Translator/Producer/Diagram.pm @@ -46,8 +46,8 @@ use Data::Dumper; use SQL::Translator::Schema::Constants; use SQL::Translator::Utils qw(debug); -use vars qw[ $VERSION $DEBUG ]; -$VERSION = '1.59'; +our $DEBUG; +our $VERSION = '1.59'; $DEBUG = 0 unless defined $DEBUG; use constant VALID_FONT_SIZE => { diff --git a/lib/SQL/Translator/Producer/Dumper.pm b/lib/SQL/Translator/Producer/Dumper.pm index 6e80a92..0a24cd6 100644 --- a/lib/SQL/Translator/Producer/Dumper.pm +++ b/lib/SQL/Translator/Producer/Dumper.pm @@ -38,11 +38,10 @@ use Config; use SQL::Translator; use File::Temp 'tempfile'; use Template; -use vars qw($VERSION); use Data::Dumper; -$VERSION = '1.59'; +our $VERSION = '1.59'; sub produce { my $t = shift; diff --git a/lib/SQL/Translator/Producer/GraphViz.pm b/lib/SQL/Translator/Producer/GraphViz.pm index 486a921..c6c9c4d 100644 --- a/lib/SQL/Translator/Producer/GraphViz.pm +++ b/lib/SQL/Translator/Producer/GraphViz.pm @@ -229,8 +229,8 @@ use SQL::Translator::Schema::Constants; use SQL::Translator::Utils qw(debug); use Scalar::Util qw/openhandle/; -use vars qw[ $VERSION $DEBUG ]; -$VERSION = '1.59'; +our $DEBUG; +our $VERSION = '1.59'; $DEBUG = 0 unless defined $DEBUG; sub produce { diff --git a/lib/SQL/Translator/Producer/HTML.pm b/lib/SQL/Translator/Producer/HTML.pm index 569bde5..dad440d 100644 --- a/lib/SQL/Translator/Producer/HTML.pm +++ b/lib/SQL/Translator/Producer/HTML.pm @@ -3,13 +3,11 @@ package SQL::Translator::Producer::HTML; use strict; use warnings; use Data::Dumper; -use vars qw($VERSION $NOWRAP $NOLINKTABLE $NAME); -$VERSION = '1.59'; - -$NAME = __PACKAGE__; -$NOWRAP = 0 unless defined $NOWRAP; -$NOLINKTABLE = 0 unless defined $NOLINKTABLE; +our $VERSION = '1.59'; +our $NAME = __PACKAGE__; +our $NOWRAP = 0 unless defined $NOWRAP; +our $NOLINKTABLE = 0 unless defined $NOLINKTABLE; # Emit XHTML by default $CGI::XHTML = $CGI::XHTML = 42; diff --git a/lib/SQL/Translator/Producer/Latex.pm b/lib/SQL/Translator/Producer/Latex.pm index c7e661e..95d2831 100644 --- a/lib/SQL/Translator/Producer/Latex.pm +++ b/lib/SQL/Translator/Producer/Latex.pm @@ -37,8 +37,8 @@ automatically arrange them horizontally or vertically. use strict; use warnings; -use vars qw[ $DEBUG $VERSION @EXPORT_OK ]; -$VERSION = '1.59'; +our @EXPORT_OK; +our $VERSION = '1.59'; $DEBUG = 0 unless defined $DEBUG; use SQL::Translator::Utils 'debug'; diff --git a/lib/SQL/Translator/Producer/MySQL.pm b/lib/SQL/Translator/Producer/MySQL.pm index be8ced5..7e10d55 100644 --- a/lib/SQL/Translator/Producer/MySQL.pm +++ b/lib/SQL/Translator/Producer/MySQL.pm @@ -81,8 +81,8 @@ Set the fields charater set and collation order. use strict; use warnings; -use vars qw[ $VERSION $DEBUG %used_names ]; -$VERSION = '1.59'; +our ( $DEBUG, %used_names ); +our $VERSION = '1.59'; $DEBUG = 0 unless defined $DEBUG; # Maximum length for most identifiers is 64, according to: diff --git a/lib/SQL/Translator/Producer/Oracle.pm b/lib/SQL/Translator/Producer/Oracle.pm index bbcab0c..ba0b9de 100644 --- a/lib/SQL/Translator/Producer/Oracle.pm +++ b/lib/SQL/Translator/Producer/Oracle.pm @@ -89,8 +89,8 @@ context the slash will be still there to ensure compatibility with SQLPlus. use strict; use warnings; -use vars qw[ $VERSION $DEBUG $WARN ]; -$VERSION = '1.59'; +our ( $DEBUG, $WARN ); +our $VERSION = '1.59'; $DEBUG = 0 unless defined $DEBUG; use SQL::Translator::Schema::Constants; diff --git a/lib/SQL/Translator/Producer/POD.pm b/lib/SQL/Translator/Producer/POD.pm index b7aa028..abced98 100644 --- a/lib/SQL/Translator/Producer/POD.pm +++ b/lib/SQL/Translator/Producer/POD.pm @@ -22,8 +22,7 @@ interesting formats using Pod::POM or Template::Toolkit's POD plugin. use strict; use warnings; -use vars qw[ $VERSION ]; -$VERSION = '1.59'; +our $VERSION = '1.59'; use SQL::Translator::Schema::Constants; use SQL::Translator::Utils qw(header_comment); diff --git a/lib/SQL/Translator/Producer/PostgreSQL.pm b/lib/SQL/Translator/Producer/PostgreSQL.pm index 551f9b1..5d8a9aa 100644 --- a/lib/SQL/Translator/Producer/PostgreSQL.pm +++ b/lib/SQL/Translator/Producer/PostgreSQL.pm @@ -21,8 +21,8 @@ Does not yet support PostGIS Views. use strict; use warnings; -use vars qw[ $DEBUG $WARN $VERSION ]; -$VERSION = '1.59'; +our ( $DEBUG, $WARN ); +our $VERSION = '1.59'; $DEBUG = 0 unless defined $DEBUG; use base qw(SQL::Translator::Producer); diff --git a/lib/SQL/Translator/Producer/SQLServer.pm b/lib/SQL/Translator/Producer/SQLServer.pm index f16c7f1..61c6eeb 100644 --- a/lib/SQL/Translator/Producer/SQLServer.pm +++ b/lib/SQL/Translator/Producer/SQLServer.pm @@ -36,8 +36,8 @@ List of values for an enum field. use strict; use warnings; -use vars qw[ $DEBUG $WARN $VERSION ]; -$VERSION = '1.59'; +our ( $DEBUG, $WARN ); +our $VERSION = '1.59'; $DEBUG = 1 unless defined $DEBUG; use Data::Dumper; diff --git a/lib/SQL/Translator/Producer/SQLite.pm b/lib/SQL/Translator/Producer/SQLite.pm index fb09d80..5834fce 100644 --- a/lib/SQL/Translator/Producer/SQLite.pm +++ b/lib/SQL/Translator/Producer/SQLite.pm @@ -23,9 +23,9 @@ use Data::Dumper; use SQL::Translator::Schema::Constants; use SQL::Translator::Utils qw(debug header_comment parse_dbms_version); -use vars qw[ $VERSION $DEBUG $WARN ]; +our ( $DEBUG, $WARN ); -$VERSION = '1.59'; +our $VERSION = '1.59'; $DEBUG = 0 unless defined $DEBUG; $WARN = 0 unless defined $WARN; diff --git a/lib/SQL/Translator/Producer/Storable.pm b/lib/SQL/Translator/Producer/Storable.pm index ab764d6..4113690 100644 --- a/lib/SQL/Translator/Producer/Storable.pm +++ b/lib/SQL/Translator/Producer/Storable.pm @@ -23,9 +23,9 @@ takes a long time. use strict; use warnings; -use vars qw($DEBUG $VERSION @EXPORT_OK); +our ( $DEBUG, @EXPORT_OK ); $DEBUG = 0 unless defined $DEBUG; -$VERSION = '1.59'; +our $VERSION = '1.59'; use Storable; use Exporter; diff --git a/lib/SQL/Translator/Producer/Sybase.pm b/lib/SQL/Translator/Producer/Sybase.pm index 8db9d29..fec655a 100644 --- a/lib/SQL/Translator/Producer/Sybase.pm +++ b/lib/SQL/Translator/Producer/Sybase.pm @@ -19,8 +19,8 @@ This module will produce text output of the schema suitable for Sybase. use strict; use warnings; -use vars qw[ $DEBUG $WARN $VERSION ]; -$VERSION = '1.59'; +our ( $DEBUG, $WARN ); +our $VERSION = '1.59'; $DEBUG = 1 unless defined $DEBUG; use Data::Dumper; diff --git a/lib/SQL/Translator/Producer/TT/Base.pm b/lib/SQL/Translator/Producer/TT/Base.pm index d540d04..9c86f86 100644 --- a/lib/SQL/Translator/Producer/TT/Base.pm +++ b/lib/SQL/Translator/Producer/TT/Base.pm @@ -12,8 +12,8 @@ class. use strict; use warnings; -use vars qw[ $VERSION @EXPORT_OK ]; -$VERSION = '1.59'; +our @EXPORT_OK; +our $VERSION = '1.59'; use Template; use Data::Dumper; diff --git a/lib/SQL/Translator/Producer/TT/Table.pm b/lib/SQL/Translator/Producer/TT/Table.pm index 77f3377..9b952da 100644 --- a/lib/SQL/Translator/Producer/TT/Table.pm +++ b/lib/SQL/Translator/Producer/TT/Table.pm @@ -156,8 +156,8 @@ whitespace either side, to be recognised. use strict; use warnings; -use vars qw[ $DEBUG $VERSION @EXPORT_OK ]; -$VERSION = '1.59'; +our ( $DEBUG, @EXPORT_OK ); +our $VERSION = '1.59'; $DEBUG = 0 unless defined $DEBUG; use File::Path; diff --git a/lib/SQL/Translator/Producer/TTSchema.pm b/lib/SQL/Translator/Producer/TTSchema.pm index 91481ef..45bbd6d 100644 --- a/lib/SQL/Translator/Producer/TTSchema.pm +++ b/lib/SQL/Translator/Producer/TTSchema.pm @@ -107,8 +107,8 @@ constructor. use strict; use warnings; -use vars qw[ $DEBUG $VERSION @EXPORT_OK ]; -$VERSION = '1.59'; +our ( $DEBUG, @EXPORT_OK ); +our $VERSION = '1.59'; $DEBUG = 0 unless defined $DEBUG; use Template; diff --git a/lib/SQL/Translator/Producer/XML.pm b/lib/SQL/Translator/Producer/XML.pm index 9685ef2..ff7151b 100644 --- a/lib/SQL/Translator/Producer/XML.pm +++ b/lib/SQL/Translator/Producer/XML.pm @@ -24,8 +24,8 @@ Ken Youens-Clark Ekclark@cpan.orgE. use strict; use warnings; -use vars qw[ $VERSION $DEBUG ]; -$VERSION = '1.59'; +our $DEBUG; +our $VERSION = '1.59'; $DEBUG = 1 unless defined $DEBUG; use SQL::Translator::Producer::XML::SQLFairy; diff --git a/lib/SQL/Translator/Producer/XML/SQLFairy.pm b/lib/SQL/Translator/Producer/XML/SQLFairy.pm index 3b349b5..995f540 100644 --- a/lib/SQL/Translator/Producer/XML/SQLFairy.pm +++ b/lib/SQL/Translator/Producer/XML/SQLFairy.pm @@ -142,8 +142,8 @@ To convert your old format files simply pass them through the translator :) use strict; use warnings; -use vars qw[ $VERSION @EXPORT_OK ]; -$VERSION = '1.59'; +our @EXPORT_OK; +our $VERSION = '1.59'; use Exporter; use base qw(Exporter); diff --git a/lib/SQL/Translator/Producer/YAML.pm b/lib/SQL/Translator/Producer/YAML.pm index 67f4d5b..177cbdf 100644 --- a/lib/SQL/Translator/Producer/YAML.pm +++ b/lib/SQL/Translator/Producer/YAML.pm @@ -21,8 +21,7 @@ takes a long time. use strict; use warnings; -use vars qw($VERSION); -$VERSION = '1.59'; +our $VERSION = '1.59'; use YAML qw(Dump); diff --git a/lib/SQL/Translator/Schema.pm b/lib/SQL/Translator/Schema.pm index ecd6d50..032ff16 100644 --- a/lib/SQL/Translator/Schema.pm +++ b/lib/SQL/Translator/Schema.pm @@ -37,9 +37,7 @@ use SQL::Translator::Schema::View; use SQL::Translator::Utils 'parse_list_arg'; use base 'SQL::Translator::Schema::Object'; -use vars qw[ $VERSION ]; - -$VERSION = '1.59'; +our $VERSION = '1.59'; __PACKAGE__->_attributes(qw/name database translator/); diff --git a/lib/SQL/Translator/Schema/Constants.pm b/lib/SQL/Translator/Schema/Constants.pm index 76bef63..e56e062 100644 --- a/lib/SQL/Translator/Schema/Constants.pm +++ b/lib/SQL/Translator/Schema/Constants.pm @@ -42,11 +42,10 @@ This module exports the following constants for Schema features; use strict; use warnings; use base qw( Exporter ); -use vars qw( @EXPORT $VERSION ); require Exporter; -$VERSION = '1.59'; +our $VERSION = '1.59'; -@EXPORT = qw[ +our @EXPORT = qw[ CHECK_C FOREIGN_KEY FULL_TEXT diff --git a/lib/SQL/Translator/Schema/Constraint.pm b/lib/SQL/Translator/Schema/Constraint.pm index 303ffd7..8f09736 100644 --- a/lib/SQL/Translator/Schema/Constraint.pm +++ b/lib/SQL/Translator/Schema/Constraint.pm @@ -30,9 +30,9 @@ use SQL::Translator::Utils 'parse_list_arg'; use base 'SQL::Translator::Schema::Object'; -use vars qw($VERSION $TABLE_COUNT $VIEW_COUNT); + our ( $TABLE_COUNT, $VIEW_COUNT ); -$VERSION = '1.59'; +our $VERSION = '1.59'; my %VALID_CONSTRAINT_TYPE = ( PRIMARY_KEY, 1, diff --git a/lib/SQL/Translator/Schema/Field.pm b/lib/SQL/Translator/Schema/Field.pm index 10c6353..24b1383 100644 --- a/lib/SQL/Translator/Schema/Field.pm +++ b/lib/SQL/Translator/Schema/Field.pm @@ -29,9 +29,9 @@ use SQL::Translator::Utils 'parse_list_arg'; use base 'SQL::Translator::Schema::Object'; -use vars qw($VERSION $TABLE_COUNT $VIEW_COUNT); +our ( $TABLE_COUNT, $VIEW_COUNT ); -$VERSION = '1.59'; +our $VERSION = '1.59'; # Stringify to our name, being careful not to pass any args through so we don't # accidentally set it to undef. We also have to tweak bool so the object is diff --git a/lib/SQL/Translator/Schema/Graph.pm b/lib/SQL/Translator/Schema/Graph.pm index 8d8c532..2b8107f 100644 --- a/lib/SQL/Translator/Schema/Graph.pm +++ b/lib/SQL/Translator/Schema/Graph.pm @@ -29,7 +29,7 @@ use Class::MakeMethods::Template::Hash ( 'number --counter' => [ qw( order ) ], ); -use vars qw/$DEBUG/; +our $DEBUG; $DEBUG = 0 unless defined $DEBUG; sub init { diff --git a/lib/SQL/Translator/Schema/Index.pm b/lib/SQL/Translator/Schema/Index.pm index be863ca..7a04656 100644 --- a/lib/SQL/Translator/Schema/Index.pm +++ b/lib/SQL/Translator/Schema/Index.pm @@ -32,9 +32,9 @@ use SQL::Translator::Utils 'parse_list_arg'; use base 'SQL::Translator::Schema::Object'; -use vars qw($VERSION $TABLE_COUNT $VIEW_COUNT); +our ( $TABLE_COUNT, $VIEW_COUNT ); -$VERSION = '1.59'; +our $VERSION = '1.59'; my %VALID_INDEX_TYPE = ( UNIQUE => 1, diff --git a/lib/SQL/Translator/Schema/Object.pm b/lib/SQL/Translator/Schema/Object.pm index b5a8722..f38ee41 100644 --- a/lib/SQL/Translator/Schema/Object.pm +++ b/lib/SQL/Translator/Schema/Object.pm @@ -22,9 +22,7 @@ use base 'Class::Data::Inheritable'; use base 'Class::Base'; use Class::MakeMethods::Utility::Ref qw( ref_compare ); -use vars qw[ $VERSION ]; - -$VERSION = '1.59'; +our $VERSION = '1.59'; =head1 Construction diff --git a/lib/SQL/Translator/Schema/Procedure.pm b/lib/SQL/Translator/Schema/Procedure.pm index 15686e7..94f11ce 100644 --- a/lib/SQL/Translator/Schema/Procedure.pm +++ b/lib/SQL/Translator/Schema/Procedure.pm @@ -33,9 +33,7 @@ use SQL::Translator::Utils 'parse_list_arg'; use base 'SQL::Translator::Schema::Object'; -use vars qw($VERSION); - -$VERSION = '1.59'; +our $VERSION = '1.59'; __PACKAGE__->_attributes( qw/ name sql parameters comments owner sql schema order diff --git a/lib/SQL/Translator/Schema/Table.pm b/lib/SQL/Translator/Schema/Table.pm index 4f299ad..67fdb17 100644 --- a/lib/SQL/Translator/Schema/Table.pm +++ b/lib/SQL/Translator/Schema/Table.pm @@ -30,9 +30,7 @@ use Data::Dumper; use base 'SQL::Translator::Schema::Object'; -use vars qw( $VERSION ); - -$VERSION = '1.59'; +our $VERSION = '1.59'; # Stringify to our name, being careful not to pass any args through so we don't # accidentally set it to undef. We also have to tweak bool so the object is diff --git a/lib/SQL/Translator/Schema/Trigger.pm b/lib/SQL/Translator/Schema/Trigger.pm index 3513849..1939fb1 100644 --- a/lib/SQL/Translator/Schema/Trigger.pm +++ b/lib/SQL/Translator/Schema/Trigger.pm @@ -35,9 +35,9 @@ use base 'SQL::Translator::Schema::Object'; use Carp; -use vars qw($VERSION $TABLE_COUNT $VIEW_COUNT); +our ( $TABLE_COUNT, $VIEW_COUNT ); -$VERSION = '1.59'; +our $VERSION = '1.59'; __PACKAGE__->_attributes( qw/ name schema perform_action_when database_events database_event diff --git a/lib/SQL/Translator/Schema/View.pm b/lib/SQL/Translator/Schema/View.pm index ff0b169..9ff84cc 100644 --- a/lib/SQL/Translator/Schema/View.pm +++ b/lib/SQL/Translator/Schema/View.pm @@ -29,9 +29,9 @@ use SQL::Translator::Utils 'parse_list_arg'; use base 'SQL::Translator::Schema::Object'; -use vars qw($VERSION $TABLE_COUNT $VIEW_COUNT); +our ( $TABLE_COUNT, $VIEW_COUNT ); -$VERSION = '1.59'; +our $VERSION = '1.59'; __PACKAGE__->_attributes( qw/ name sql fields schema order diff --git a/lib/SQL/Translator/Utils.pm b/lib/SQL/Translator/Utils.pm index 466263e..98c0f9f 100644 --- a/lib/SQL/Translator/Utils.pm +++ b/lib/SQL/Translator/Utils.pm @@ -3,13 +3,12 @@ package SQL::Translator::Utils; use strict; use warnings; use base qw(Exporter); -use vars qw($VERSION $DEFAULT_COMMENT @EXPORT_OK); use Digest::SHA1 qw( sha1_hex ); use Exporter; -$VERSION = '1.59'; -$DEFAULT_COMMENT = '-- '; -@EXPORT_OK = qw( +our $VERSION = '1.59'; +our $DEFAULT_COMMENT = '-- '; +our @EXPORT_OK = qw( debug normalize_name header_comment parse_list_arg truncate_id_uniquely $DEFAULT_COMMENT parse_mysql_version parse_dbms_version ); diff --git a/lib/Test/SQL/Translator.pm b/lib/Test/SQL/Translator.pm index 63a8954..a2b0bcf 100644 --- a/lib/Test/SQL/Translator.pm +++ b/lib/Test/SQL/Translator.pm @@ -14,9 +14,9 @@ use Test::More; use SQL::Translator::Schema::Constants; use base qw(Exporter); -use vars qw($VERSION @EXPORT @EXPORT_OK); -$VERSION = '1.59'; -@EXPORT = qw( +our @EXPORT_OK; +our $VERSION = '1.59'; +our @EXPORT = qw( schema_ok table_ok field_ok