From: Peter Rabbitson Date: Sat, 4 Feb 2012 20:46:14 +0000 (+0100) Subject: Move ProducerUtils into the new dir layout X-Git-Tag: v0.11011~27^2~28 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=fd9f0e09a112c7070ba09c15e2fa8f00eccee10e;p=dbsrgits%2FSQL-Translator.git Move ProducerUtils into the new dir layout --- diff --git a/lib/SQL/Translator/ProducerUtils.pm b/lib/SQL/Translator/Generator/Utils.pm similarity index 96% rename from lib/SQL/Translator/ProducerUtils.pm rename to lib/SQL/Translator/Generator/Utils.pm index 2b600bd..6dd6cda 100644 --- a/lib/SQL/Translator/ProducerUtils.pm +++ b/lib/SQL/Translator/Generator/Utils.pm @@ -1,5 +1,5 @@ package # hide from pause - SQL::Translator::ProducerUtils; + SQL::Translator::Generator::Utils; use Moo; use Sub::Quote 'quote_sub'; diff --git a/lib/SQL/Translator/Producer/SQLServer.pm b/lib/SQL/Translator/Producer/SQLServer.pm index 61c6eeb..dc75551 100644 --- a/lib/SQL/Translator/Producer/SQLServer.pm +++ b/lib/SQL/Translator/Producer/SQLServer.pm @@ -43,9 +43,9 @@ $DEBUG = 1 unless defined $DEBUG; use Data::Dumper; use SQL::Translator::Schema::Constants; use SQL::Translator::Utils qw(debug header_comment); -use SQL::Translator::ProducerUtils; +use SQL::Translator::Generator::Utils; -my $util = SQL::Translator::ProducerUtils->new( quote_chars => ['[', ']'] ); +my $util = SQL::Translator::Generator::Utils->new( quote_chars => ['[', ']'] ); my %translate = ( date => 'datetime', diff --git a/lib/SQL/Translator/Producer/SQLite.pm b/lib/SQL/Translator/Producer/SQLite.pm index 645d014..8d61a24 100644 --- a/lib/SQL/Translator/Producer/SQLite.pm +++ b/lib/SQL/Translator/Producer/SQLite.pm @@ -22,8 +22,8 @@ use warnings; use Data::Dumper; use SQL::Translator::Schema::Constants; use SQL::Translator::Utils qw(debug header_comment parse_dbms_version); -use SQL::Translator::ProducerUtils; -my $util = SQL::Translator::ProducerUtils->new( quote_chars => q(") ); +use SQL::Translator::Generator::Utils; +my $util = SQL::Translator::Generator::Utils->new( quote_chars => q(") ); our ( $DEBUG, $WARN ); our $VERSION = '1.59'; diff --git a/t/65-producerutils.t b/t/65-generator-utils.t similarity index 73% rename from t/65-producerutils.t rename to t/65-generator-utils.t index 3e1c93c..5eb4691 100644 --- a/t/65-producerutils.t +++ b/t/65-generator-utils.t @@ -3,23 +3,23 @@ use warnings; use Test::More; -use SQL::Translator::ProducerUtils; +use SQL::Translator::Generator::Utils; -my $util = SQL::Translator::ProducerUtils->new( +my $util = SQL::Translator::Generator::Utils->new( quote_chars => ['[', ']'], ); is $util->quote('frew'), '[frew]', 'simple quote works'; is $util->quote('people.frew'), '[people].[frew]', 'namespaced quote works'; -my $single_util = SQL::Translator::ProducerUtils->new( +my $single_util = SQL::Translator::Generator::Utils->new( quote_chars => q(|), ); is $single_util->quote('frew'), '|frew|', 'simple single quote works'; is $single_util->quote('people.frew'), '|people|.|frew|', 'namespaced single quote works'; -my $no_util = SQL::Translator::ProducerUtils->new(); +my $no_util = SQL::Translator::Generator::Utils->new(); is $no_util->quote('frew'), 'frew', 'simple no quote works'; is $no_util->quote('people.frew'), 'people.frew', 'namespaced no quote works';