Move ProducerUtils into the new dir layout
Peter Rabbitson [Sat, 4 Feb 2012 20:46:14 +0000 (21:46 +0100)]
lib/SQL/Translator/Generator/Utils.pm [moved from lib/SQL/Translator/ProducerUtils.pm with 96% similarity]
lib/SQL/Translator/Producer/SQLServer.pm
lib/SQL/Translator/Producer/SQLite.pm
t/65-generator-utils.t [moved from t/65-producerutils.t with 73% similarity]

similarity index 96%
rename from lib/SQL/Translator/ProducerUtils.pm
rename to lib/SQL/Translator/Generator/Utils.pm
index 2b600bd..6dd6cda 100644 (file)
@@ -1,5 +1,5 @@
 package # hide from pause
-  SQL::Translator::ProducerUtils;
+  SQL::Translator::Generator::Utils;
 
 use Moo;
 use Sub::Quote 'quote_sub';
index 61c6eeb..dc75551 100644 (file)
@@ -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',
index 645d014..8d61a24 100644 (file)
@@ -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';
similarity index 73%
rename from t/65-producerutils.t
rename to t/65-generator-utils.t
index 3e1c93c..5eb4691 100644 (file)
@@ -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';