From: Arthur Axel 'fREW' Schmidt Date: Sat, 26 Feb 2011 07:17:23 +0000 (-0600) Subject: use warnings X-Git-Tag: v0.11011~69 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f27f9229eaf8c5ce637bea1f99eb8f9bdb42799c;p=dbsrgits%2FSQL-Translator.git use warnings --- diff --git a/lib/SQL/Translator.pm b/lib/SQL/Translator.pm index 0402fd0..e9b6ed6 100644 --- a/lib/SQL/Translator.pm +++ b/lib/SQL/Translator.pm @@ -1,6 +1,7 @@ package SQL::Translator; use strict; +use warnings; use vars qw( $VERSION $DEFAULT_SUB $DEBUG $ERROR ); use base 'Class::Base'; diff --git a/lib/SQL/Translator/Filter/DefaultExtra.pm b/lib/SQL/Translator/Filter/DefaultExtra.pm index 6b692b2..6cd399f 100644 --- a/lib/SQL/Translator/Filter/DefaultExtra.pm +++ b/lib/SQL/Translator/Filter/DefaultExtra.pm @@ -32,6 +32,7 @@ objects. =cut use strict; +use warnings; use vars qw/$VERSION/; $VERSION = '1.59'; diff --git a/lib/SQL/Translator/Filter/Globals.pm b/lib/SQL/Translator/Filter/Globals.pm index d3a049f..269ac5c 100644 --- a/lib/SQL/Translator/Filter/Globals.pm +++ b/lib/SQL/Translator/Filter/Globals.pm @@ -37,6 +37,7 @@ SQL::Translator::Filter::Globals - Add global fields and indices to all tables. =cut use strict; +use warnings; use vars qw/$VERSION/; $VERSION = '1.59'; diff --git a/lib/SQL/Translator/Filter/Names.pm b/lib/SQL/Translator/Filter/Names.pm index b36bd9b..c5f9195 100644 --- a/lib/SQL/Translator/Filter/Names.pm +++ b/lib/SQL/Translator/Filter/Names.pm @@ -28,6 +28,7 @@ SQL::Translator::Filter::Names - Tweak the names of schema objects. =cut use strict; +use warnings; use vars qw/$VERSION/; $VERSION = '1.59'; diff --git a/lib/SQL/Translator/Parser.pm b/lib/SQL/Translator/Parser.pm index f6bcc6d..0307cd2 100644 --- a/lib/SQL/Translator/Parser.pm +++ b/lib/SQL/Translator/Parser.pm @@ -1,6 +1,7 @@ package SQL::Translator::Parser; use strict; +use warnings; use vars qw( $VERSION ); $VERSION = '1.60'; diff --git a/lib/SQL/Translator/Parser/Access.pm b/lib/SQL/Translator/Parser/Access.pm index d1ff7d7..04de8c0 100644 --- a/lib/SQL/Translator/Parser/Access.pm +++ b/lib/SQL/Translator/Parser/Access.pm @@ -20,6 +20,7 @@ something similar to the output of mdbtools (http://mdbtools.sourceforge.net/). =cut use strict; +use warnings; use vars qw[ $DEBUG $VERSION $GRAMMAR @EXPORT_OK ]; $VERSION = '1.59'; $DEBUG = 0 unless defined $DEBUG; diff --git a/lib/SQL/Translator/Parser/DBI.pm b/lib/SQL/Translator/Parser/DBI.pm index d758231..05c95df 100644 --- a/lib/SQL/Translator/Parser/DBI.pm +++ b/lib/SQL/Translator/Parser/DBI.pm @@ -97,6 +97,7 @@ query Oracle directly and skip the parsing of a text file, too. =cut use strict; +use warnings; use DBI; use vars qw($VERSION @EXPORT); $VERSION = '1.59'; diff --git a/lib/SQL/Translator/Parser/DBI/DB2.pm b/lib/SQL/Translator/Parser/DBI/DB2.pm index 12797f2..a434b18 100644 --- a/lib/SQL/Translator/Parser/DBI/DB2.pm +++ b/lib/SQL/Translator/Parser/DBI/DB2.pm @@ -16,6 +16,7 @@ delegates to DBD::DB2. =cut use strict; +use warnings; use DBI; use Data::Dumper; use SQL::Translator::Parser::DB2; diff --git a/lib/SQL/Translator/Parser/DBI/MySQL.pm b/lib/SQL/Translator/Parser/DBI/MySQL.pm index c7920e6..09570a6 100644 --- a/lib/SQL/Translator/Parser/DBI/MySQL.pm +++ b/lib/SQL/Translator/Parser/DBI/MySQL.pm @@ -17,6 +17,7 @@ a create file. Should be much faster for larger schemas. =cut use strict; +use warnings; use DBI; use Data::Dumper; use SQL::Translator::Schema::Constants; diff --git a/lib/SQL/Translator/Parser/DBI/PostgreSQL.pm b/lib/SQL/Translator/Parser/DBI/PostgreSQL.pm index 584b254..68df21a 100644 --- a/lib/SQL/Translator/Parser/DBI/PostgreSQL.pm +++ b/lib/SQL/Translator/Parser/DBI/PostgreSQL.pm @@ -15,6 +15,7 @@ Uses DBI to query PostgreSQL system tables to determine schema structure. =cut use strict; +use warnings; use DBI; use Data::Dumper; use SQL::Translator::Schema::Constants; diff --git a/lib/SQL/Translator/Parser/DBI/SQLServer.pm b/lib/SQL/Translator/Parser/DBI/SQLServer.pm index 9673029..847f5a5 100644 --- a/lib/SQL/Translator/Parser/DBI/SQLServer.pm +++ b/lib/SQL/Translator/Parser/DBI/SQLServer.pm @@ -15,6 +15,7 @@ Uses DBI Catalog Methods. =cut use strict; +use warnings; use DBI; use SQL::Translator::Schema; use Data::Dumper; diff --git a/lib/SQL/Translator/Parser/DBI/SQLite.pm b/lib/SQL/Translator/Parser/DBI/SQLite.pm index c0f78ee..c76e485 100644 --- a/lib/SQL/Translator/Parser/DBI/SQLite.pm +++ b/lib/SQL/Translator/Parser/DBI/SQLite.pm @@ -20,6 +20,7 @@ schema to a text file and parsing that. =cut use strict; +use warnings; use DBI; use SQL::Translator::Parser::SQLite; use Data::Dumper; diff --git a/lib/SQL/Translator/Parser/DBI/Sybase.pm b/lib/SQL/Translator/Parser/DBI/Sybase.pm index eaa52aa..b9931b3 100644 --- a/lib/SQL/Translator/Parser/DBI/Sybase.pm +++ b/lib/SQL/Translator/Parser/DBI/Sybase.pm @@ -15,6 +15,7 @@ Uses DBI Catalog Methods. =cut use strict; +use warnings; use DBI; use SQL::Translator::Schema; use Data::Dumper; diff --git a/lib/SQL/Translator/Parser/Excel.pm b/lib/SQL/Translator/Parser/Excel.pm index ac99555..66b1145 100644 --- a/lib/SQL/Translator/Parser/Excel.pm +++ b/lib/SQL/Translator/Parser/Excel.pm @@ -29,6 +29,7 @@ and field sizes. True by default. =cut use strict; +use warnings; use vars qw($DEBUG $VERSION @EXPORT_OK); $DEBUG = 0 unless defined $DEBUG; $VERSION = '1.59'; diff --git a/lib/SQL/Translator/Parser/MySQL.pm b/lib/SQL/Translator/Parser/MySQL.pm index 793e8cd..f498245 100644 --- a/lib/SQL/Translator/Parser/MySQL.pm +++ b/lib/SQL/Translator/Parser/MySQL.pm @@ -128,6 +128,7 @@ More information about the MySQL comment-syntax: Lkclark@cpan.orgE. =cut use strict; +use warnings; use vars qw[ $VERSION $DEBUG ]; $VERSION = '1.59'; $DEBUG = 1 unless defined $DEBUG; diff --git a/lib/SQL/Translator/Parser/XML/SQLFairy.pm b/lib/SQL/Translator/Parser/XML/SQLFairy.pm index 2d3e4e8..eb5d023 100644 --- a/lib/SQL/Translator/Parser/XML/SQLFairy.pm +++ b/lib/SQL/Translator/Parser/XML/SQLFairy.pm @@ -76,6 +76,7 @@ To convert your old format files simply pass them through the translator :) =cut use strict; +use warnings; use vars qw[ $DEBUG $VERSION @EXPORT_OK ]; $VERSION = '1.59'; diff --git a/lib/SQL/Translator/Parser/YAML.pm b/lib/SQL/Translator/Parser/YAML.pm index 67afb0e..3ea5ba0 100644 --- a/lib/SQL/Translator/Parser/YAML.pm +++ b/lib/SQL/Translator/Parser/YAML.pm @@ -1,6 +1,7 @@ package SQL::Translator::Parser::YAML; use strict; +use warnings; use vars qw($VERSION); $VERSION = '1.59'; diff --git a/lib/SQL/Translator/Parser/xSV.pm b/lib/SQL/Translator/Parser/xSV.pm index e243945..edf0100 100644 --- a/lib/SQL/Translator/Parser/xSV.pm +++ b/lib/SQL/Translator/Parser/xSV.pm @@ -44,6 +44,7 @@ C. =cut use strict; +use warnings; use vars qw($VERSION @EXPORT); $VERSION = '1.59'; diff --git a/lib/SQL/Translator/Producer.pm b/lib/SQL/Translator/Producer.pm index e699334..63a1597 100644 --- a/lib/SQL/Translator/Producer.pm +++ b/lib/SQL/Translator/Producer.pm @@ -1,6 +1,7 @@ package SQL::Translator::Producer; use strict; +use warnings; use vars qw($VERSION); use Scalar::Util (); $VERSION = '1.59'; diff --git a/lib/SQL/Translator/Producer/ClassDBI.pm b/lib/SQL/Translator/Producer/ClassDBI.pm index 4bc42da..b52f7fe 100644 --- a/lib/SQL/Translator/Producer/ClassDBI.pm +++ b/lib/SQL/Translator/Producer/ClassDBI.pm @@ -1,6 +1,7 @@ package SQL::Translator::Producer::ClassDBI; use strict; +use warnings; use vars qw[ $VERSION $DEBUG ]; $VERSION = '1.59'; $DEBUG = 1 unless defined $DEBUG; diff --git a/lib/SQL/Translator/Producer/DB2.pm b/lib/SQL/Translator/Producer/DB2.pm index 27fa413..1eb52d1 100644 --- a/lib/SQL/Translator/Producer/DB2.pm +++ b/lib/SQL/Translator/Producer/DB2.pm @@ -19,6 +19,7 @@ Creates an SQL DDL suitable for DB2. use warnings; use strict; +use warnings; use vars qw[ $VERSION $DEBUG $WARN ]; $VERSION = '1.59'; $DEBUG = 0 unless defined $DEBUG; diff --git a/lib/SQL/Translator/Producer/DiaUml.pm b/lib/SQL/Translator/Producer/DiaUml.pm index 1ef606f..0eedb87 100644 --- a/lib/SQL/Translator/Producer/DiaUml.pm +++ b/lib/SQL/Translator/Producer/DiaUml.pm @@ -35,6 +35,7 @@ automatically arrange them horizontally or vertically. =cut use strict; +use warnings; use vars qw[ $DEBUG $VERSION @EXPORT_OK ]; $VERSION = '1.59'; diff --git a/lib/SQL/Translator/Producer/Diagram.pm b/lib/SQL/Translator/Producer/Diagram.pm index 3001ca3..f7a06a2 100644 --- a/lib/SQL/Translator/Producer/Diagram.pm +++ b/lib/SQL/Translator/Producer/Diagram.pm @@ -40,6 +40,7 @@ Use via SQL::Translator: =cut use strict; +use warnings; use GD; use Data::Dumper; use SQL::Translator::Schema::Constants; @@ -85,19 +86,19 @@ sub produce { my %skip_field = map { $_, 1 } ( ref $args->{'skip_fields'} eq 'ARRAY' ? @{ $args->{'skip_fields'} } - : split ( /\s*,\s*/, $args->{'skip_fields'} ) + : split ( /\s*,\s*/, $args->{'skip_fields'}||'' ) ); my %skip_table = map { $_, 1 } ( ref $args->{'skip_tables'} eq 'ARRAY' ? @{ $args->{'skip_tables'} } - : split ( /\s*,\s*/, $args->{'skip_tables'} ) + : split ( /\s*,\s*/, $args->{'skip_tables'}||'' ) ); my @skip_tables_like = map { qr/$_/ } ( ref $args->{'skip_tables_like'} eq 'ARRAY' ? @{ $args->{'skip_tables_like'} } - : split ( /\s*,\s*/, $args->{'skip_tables_like'} ) + : split ( /\s*,\s*/, $args->{'skip_tables_like'}||'' ) ); my @table_names; @@ -217,8 +218,8 @@ sub produce { my $nlen = length $name; my $dlen = length $desc; - $max_name = $nlen if $nlen > $max_name; - $max_desc = $dlen if $dlen > $max_desc; + $max_name = $nlen if $nlen > ($max_name||0); + $max_desc = $dlen if $dlen > ($max_desc||0); push @fld_desc, [ $name, $desc, $f->{'name'}, $is_pk, $attr ]; } @@ -297,7 +298,7 @@ sub produce { ]; push @shapes, [ 'rectangle', @bounds, 'black' ]; - $max_x = $this_max_x if $this_max_x > $max_x; + $max_x = $this_max_x if $this_max_x > ($max_x||0); $y += 25; if ( ++$no_this_col == $no_per_col ) {# if we've filled up this column @@ -305,7 +306,7 @@ sub produce { $no_this_col = 0; # reset the number of tables $max_x += $gutter; # push the x over for next column $this_col_x = $max_x; # remember the max x for this col - $max_y = $y if $y > $max_y; # note the max y + $max_y = $y if $y > ($max_y||0); # note the max y $y = $orig_y; # reset the y for next column } } @@ -481,7 +482,7 @@ sub produce { my $longest; for my $len ( map { length $_ } values %legend ) { - $longest = $len if $len > $longest; + $longest = $len if $len > ($longest||0); } $longest += 2; diff --git a/lib/SQL/Translator/Producer/Dumper.pm b/lib/SQL/Translator/Producer/Dumper.pm index 9f12d94..6e80a92 100644 --- a/lib/SQL/Translator/Producer/Dumper.pm +++ b/lib/SQL/Translator/Producer/Dumper.pm @@ -33,6 +33,7 @@ generated script, or part of the DSN can be intuited from the =cut use strict; +use warnings; use Config; use SQL::Translator; use File::Temp 'tempfile'; diff --git a/lib/SQL/Translator/Producer/HTML.pm b/lib/SQL/Translator/Producer/HTML.pm index 5abc8e6..569bde5 100644 --- a/lib/SQL/Translator/Producer/HTML.pm +++ b/lib/SQL/Translator/Producer/HTML.pm @@ -1,6 +1,7 @@ package SQL::Translator::Producer::HTML; use strict; +use warnings; use Data::Dumper; use vars qw($VERSION $NOWRAP $NOLINKTABLE $NAME); diff --git a/lib/SQL/Translator/Producer/Latex.pm b/lib/SQL/Translator/Producer/Latex.pm index 4dcb825..c7e661e 100644 --- a/lib/SQL/Translator/Producer/Latex.pm +++ b/lib/SQL/Translator/Producer/Latex.pm @@ -35,6 +35,7 @@ automatically arrange them horizontally or vertically. =cut use strict; +use warnings; use vars qw[ $DEBUG $VERSION @EXPORT_OK ]; $VERSION = '1.59'; diff --git a/lib/SQL/Translator/Producer/Oracle.pm b/lib/SQL/Translator/Producer/Oracle.pm index 5f7d17f..bbcab0c 100644 --- a/lib/SQL/Translator/Producer/Oracle.pm +++ b/lib/SQL/Translator/Producer/Oracle.pm @@ -88,6 +88,7 @@ context the slash will be still there to ensure compatibility with SQLPlus. =cut use strict; +use warnings; use vars qw[ $VERSION $DEBUG $WARN ]; $VERSION = '1.59'; $DEBUG = 0 unless defined $DEBUG; diff --git a/lib/SQL/Translator/Producer/POD.pm b/lib/SQL/Translator/Producer/POD.pm index e540164..b7aa028 100644 --- a/lib/SQL/Translator/Producer/POD.pm +++ b/lib/SQL/Translator/Producer/POD.pm @@ -21,6 +21,7 @@ interesting formats using Pod::POM or Template::Toolkit's POD plugin. =cut use strict; +use warnings; use vars qw[ $VERSION ]; $VERSION = '1.59'; diff --git a/lib/SQL/Translator/Producer/SQLServer.pm b/lib/SQL/Translator/Producer/SQLServer.pm index 7718a70..f16c7f1 100644 --- a/lib/SQL/Translator/Producer/SQLServer.pm +++ b/lib/SQL/Translator/Producer/SQLServer.pm @@ -35,6 +35,7 @@ List of values for an enum field. =cut use strict; +use warnings; use vars qw[ $DEBUG $WARN $VERSION ]; $VERSION = '1.59'; $DEBUG = 1 unless defined $DEBUG; diff --git a/lib/SQL/Translator/Producer/Storable.pm b/lib/SQL/Translator/Producer/Storable.pm index f501c2f..ab764d6 100644 --- a/lib/SQL/Translator/Producer/Storable.pm +++ b/lib/SQL/Translator/Producer/Storable.pm @@ -22,6 +22,7 @@ takes a long time. =cut use strict; +use warnings; use vars qw($DEBUG $VERSION @EXPORT_OK); $DEBUG = 0 unless defined $DEBUG; $VERSION = '1.59'; diff --git a/lib/SQL/Translator/Producer/Sybase.pm b/lib/SQL/Translator/Producer/Sybase.pm index 38f125f..8db9d29 100644 --- a/lib/SQL/Translator/Producer/Sybase.pm +++ b/lib/SQL/Translator/Producer/Sybase.pm @@ -18,6 +18,7 @@ This module will produce text output of the schema suitable for Sybase. =cut use strict; +use warnings; use vars qw[ $DEBUG $WARN $VERSION ]; $VERSION = '1.59'; $DEBUG = 1 unless defined $DEBUG; diff --git a/lib/SQL/Translator/Producer/TT/Base.pm b/lib/SQL/Translator/Producer/TT/Base.pm index 74e4750..d540d04 100644 --- a/lib/SQL/Translator/Producer/TT/Base.pm +++ b/lib/SQL/Translator/Producer/TT/Base.pm @@ -10,6 +10,7 @@ class. =cut use strict; +use warnings; use vars qw[ $VERSION @EXPORT_OK ]; $VERSION = '1.59'; diff --git a/lib/SQL/Translator/Producer/TT/Table.pm b/lib/SQL/Translator/Producer/TT/Table.pm index 01460d8..77f3377 100644 --- a/lib/SQL/Translator/Producer/TT/Table.pm +++ b/lib/SQL/Translator/Producer/TT/Table.pm @@ -154,6 +154,7 @@ whitespace either side, to be recognised. =cut use strict; +use warnings; use vars qw[ $DEBUG $VERSION @EXPORT_OK ]; $VERSION = '1.59'; diff --git a/lib/SQL/Translator/Producer/TTSchema.pm b/lib/SQL/Translator/Producer/TTSchema.pm index 7ada379..91481ef 100644 --- a/lib/SQL/Translator/Producer/TTSchema.pm +++ b/lib/SQL/Translator/Producer/TTSchema.pm @@ -105,6 +105,7 @@ constructor. =cut use strict; +use warnings; use vars qw[ $DEBUG $VERSION @EXPORT_OK ]; $VERSION = '1.59'; diff --git a/lib/SQL/Translator/Producer/XML.pm b/lib/SQL/Translator/Producer/XML.pm index d0d1e3b..9685ef2 100644 --- a/lib/SQL/Translator/Producer/XML.pm +++ b/lib/SQL/Translator/Producer/XML.pm @@ -23,6 +23,7 @@ Ken Youens-Clark Ekclark@cpan.orgE. =cut use strict; +use warnings; use vars qw[ $VERSION $DEBUG ]; $VERSION = '1.59'; $DEBUG = 1 unless defined $DEBUG; diff --git a/lib/SQL/Translator/Producer/XML/SQLFairy.pm b/lib/SQL/Translator/Producer/XML/SQLFairy.pm index f1847a3..3b349b5 100644 --- a/lib/SQL/Translator/Producer/XML/SQLFairy.pm +++ b/lib/SQL/Translator/Producer/XML/SQLFairy.pm @@ -141,6 +141,7 @@ To convert your old format files simply pass them through the translator :) =cut use strict; +use warnings; use vars qw[ $VERSION @EXPORT_OK ]; $VERSION = '1.59'; diff --git a/lib/SQL/Translator/Producer/YAML.pm b/lib/SQL/Translator/Producer/YAML.pm index 21f1dff..67f4d5b 100644 --- a/lib/SQL/Translator/Producer/YAML.pm +++ b/lib/SQL/Translator/Producer/YAML.pm @@ -20,6 +20,7 @@ takes a long time. =cut use strict; +use warnings; use vars qw($VERSION); $VERSION = '1.59'; diff --git a/lib/SQL/Translator/Schema.pm b/lib/SQL/Translator/Schema.pm index 2f489ec..ecd6d50 100644 --- a/lib/SQL/Translator/Schema.pm +++ b/lib/SQL/Translator/Schema.pm @@ -27,6 +27,7 @@ returns the database structure. =cut use strict; +use warnings; use SQL::Translator::Schema::Constants; use SQL::Translator::Schema::Procedure; use SQL::Translator::Schema::Table; diff --git a/lib/SQL/Translator/Schema/Constants.pm b/lib/SQL/Translator/Schema/Constants.pm index 2126a3f..76bef63 100644 --- a/lib/SQL/Translator/Schema/Constants.pm +++ b/lib/SQL/Translator/Schema/Constants.pm @@ -40,6 +40,7 @@ This module exports the following constants for Schema features; =cut use strict; +use warnings; use base qw( Exporter ); use vars qw( @EXPORT $VERSION ); require Exporter; diff --git a/lib/SQL/Translator/Schema/Constraint.pm b/lib/SQL/Translator/Schema/Constraint.pm index 485f59d..303ffd7 100644 --- a/lib/SQL/Translator/Schema/Constraint.pm +++ b/lib/SQL/Translator/Schema/Constraint.pm @@ -24,6 +24,7 @@ C is the constraint object. =cut use strict; +use warnings; use SQL::Translator::Schema::Constants; use SQL::Translator::Utils 'parse_list_arg'; diff --git a/lib/SQL/Translator/Schema/Field.pm b/lib/SQL/Translator/Schema/Field.pm index 117f4a6..10c6353 100644 --- a/lib/SQL/Translator/Schema/Field.pm +++ b/lib/SQL/Translator/Schema/Field.pm @@ -23,6 +23,7 @@ C is the field object. =cut use strict; +use warnings; use SQL::Translator::Schema::Constants; use SQL::Translator::Utils 'parse_list_arg'; diff --git a/lib/SQL/Translator/Schema/Graph.pm b/lib/SQL/Translator/Schema/Graph.pm index 6157627..8d8c532 100644 --- a/lib/SQL/Translator/Schema/Graph.pm +++ b/lib/SQL/Translator/Schema/Graph.pm @@ -1,6 +1,7 @@ package SQL::Translator::Schema::Graph; use strict; +use warnings; use base 'Class::Base'; diff --git a/lib/SQL/Translator/Schema/Graph/CompoundEdge.pm b/lib/SQL/Translator/Schema/Graph/CompoundEdge.pm index 0ce2424..6e4860a 100644 --- a/lib/SQL/Translator/Schema/Graph/CompoundEdge.pm +++ b/lib/SQL/Translator/Schema/Graph/CompoundEdge.pm @@ -1,6 +1,7 @@ package SQL::Translator::Schema::Graph::CompoundEdge; use strict; +use warnings; use base qw(SQL::Translator::Schema::Graph::Edge); use Class::MakeMethods::Template::Hash ( new => ['new'], diff --git a/lib/SQL/Translator/Schema/Graph/Edge.pm b/lib/SQL/Translator/Schema/Graph/Edge.pm index a41d9fe..bbee535 100644 --- a/lib/SQL/Translator/Schema/Graph/Edge.pm +++ b/lib/SQL/Translator/Schema/Graph/Edge.pm @@ -1,6 +1,7 @@ package SQL::Translator::Schema::Graph::Edge; use strict; +use warnings; use Class::MakeMethods::Template::Hash ( new => ['new'], diff --git a/lib/SQL/Translator/Schema/Graph/HyperEdge.pm b/lib/SQL/Translator/Schema/Graph/HyperEdge.pm index c5ebec1..b9782b6 100644 --- a/lib/SQL/Translator/Schema/Graph/HyperEdge.pm +++ b/lib/SQL/Translator/Schema/Graph/HyperEdge.pm @@ -1,6 +1,7 @@ package SQL::Translator::Schema::Graph::HyperEdge; use strict; +use warnings; use base qw(SQL::Translator::Schema::Graph::Edge); use Class::MakeMethods::Template::Hash ( diff --git a/lib/SQL/Translator/Schema/Graph/Node.pm b/lib/SQL/Translator/Schema/Graph/Node.pm index fc901b2..87a037a 100644 --- a/lib/SQL/Translator/Schema/Graph/Node.pm +++ b/lib/SQL/Translator/Schema/Graph/Node.pm @@ -1,6 +1,7 @@ package SQL::Translator::Schema::Graph::Node; use strict; +use warnings; use Class::MakeMethods::Template::Hash ( new => [ 'new' ], diff --git a/lib/SQL/Translator/Schema/Graph/Port.pm b/lib/SQL/Translator/Schema/Graph/Port.pm index f0aeab4..6ea8968 100644 --- a/lib/SQL/Translator/Schema/Graph/Port.pm +++ b/lib/SQL/Translator/Schema/Graph/Port.pm @@ -1,5 +1,6 @@ package SQL::Translator::Schema::Graph::Port; use strict; +use warnings; 1; diff --git a/lib/SQL/Translator/Schema/Index.pm b/lib/SQL/Translator/Schema/Index.pm index 4dde462..be863ca 100644 --- a/lib/SQL/Translator/Schema/Index.pm +++ b/lib/SQL/Translator/Schema/Index.pm @@ -26,6 +26,7 @@ Primary and unique keys are table constraints, not indices. =cut use strict; +use warnings; use SQL::Translator::Schema::Constants; use SQL::Translator::Utils 'parse_list_arg'; diff --git a/lib/SQL/Translator/Schema/Object.pm b/lib/SQL/Translator/Schema/Object.pm index 7223c17..b5a8722 100644 --- a/lib/SQL/Translator/Schema/Object.pm +++ b/lib/SQL/Translator/Schema/Object.pm @@ -16,6 +16,7 @@ extra functionality. =cut use strict; +use warnings; use Class::Base; use base 'Class::Data::Inheritable'; use base 'Class::Base'; diff --git a/lib/SQL/Translator/Schema/Procedure.pm b/lib/SQL/Translator/Schema/Procedure.pm index 4d78f5e..15686e7 100644 --- a/lib/SQL/Translator/Schema/Procedure.pm +++ b/lib/SQL/Translator/Schema/Procedure.pm @@ -28,6 +28,7 @@ stored procedures (and possibly other pieces of nameable SQL code?). =cut use strict; +use warnings; use SQL::Translator::Utils 'parse_list_arg'; use base 'SQL::Translator::Schema::Object'; diff --git a/lib/SQL/Translator/Schema/Table.pm b/lib/SQL/Translator/Schema/Table.pm index 61319e1..4f299ad 100644 --- a/lib/SQL/Translator/Schema/Table.pm +++ b/lib/SQL/Translator/Schema/Table.pm @@ -20,6 +20,7 @@ C is the table object. =cut use strict; +use warnings; use SQL::Translator::Utils 'parse_list_arg'; use SQL::Translator::Schema::Constants; use SQL::Translator::Schema::Constraint; diff --git a/lib/SQL/Translator/Schema/Trigger.pm b/lib/SQL/Translator/Schema/Trigger.pm index e3358d9..3513849 100644 --- a/lib/SQL/Translator/Schema/Trigger.pm +++ b/lib/SQL/Translator/Schema/Trigger.pm @@ -28,6 +28,7 @@ C is the trigger object. =cut use strict; +use warnings; use SQL::Translator::Utils 'parse_list_arg'; use base 'SQL::Translator::Schema::Object'; diff --git a/lib/SQL/Translator/Schema/View.pm b/lib/SQL/Translator/Schema/View.pm index 807262d..ff0b169 100644 --- a/lib/SQL/Translator/Schema/View.pm +++ b/lib/SQL/Translator/Schema/View.pm @@ -24,6 +24,7 @@ C is the view object. =cut use strict; +use warnings; use SQL::Translator::Utils 'parse_list_arg'; use base 'SQL::Translator::Schema::Object'; diff --git a/lib/SQL/Translator/Utils.pm b/lib/SQL/Translator/Utils.pm index d8c1fd0..466263e 100644 --- a/lib/SQL/Translator/Utils.pm +++ b/lib/SQL/Translator/Utils.pm @@ -1,6 +1,7 @@ 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 );