+++ /dev/null
-package # hide from pause
- SQL::Translator::Generator::Utils;
-
-# AUTHOR: Arthur Axel fREW Schmidt
-# Copyright: Same as Perl 5
-
-use Moo;
-use Sub::Quote 'quote_sub';
-
-# this should be ro, but I have to modify it in BUILD so bleh
-has quote_chars => ( is => 'rw' );
-
-has name_sep => (
- is => 'ro',
- default => quote_sub q{ '.' },
-);
-
-with 'SQL::Translator::Generator::Role::Quote';
-
-sub BUILD {
- my $self = shift;
-
- unless (ref($self->quote_chars)) {
- if ($self->quote_chars) {
- $self->quote_chars([$self->quote_chars])
- } else {
- $self->quote_chars([])
- }
- }
-
- $self
-}
-
-1;
+++ /dev/null
-use strict;
-use warnings;
-
-use Test::More;
-
-use SQL::Translator::Generator::Utils;
-
-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::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::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';
-
-done_testing;