Resurrect the DB2 precompiled grammar to which we lost the source
[dbsrgits/SQL-Translator.git] / lib / SQL / Translator / Generator / Utils.pm
1 package # hide from pause
2   SQL::Translator::Generator::Utils;
3
4 # AUTHOR: Arthur Axel fREW Schmidt
5 # Copyright: Same as Perl 5
6
7 use Moo;
8 use Sub::Quote 'quote_sub';
9
10 # this should be ro, but I have to modify it in BUILD so bleh
11 has quote_chars => ( is => 'rw' );
12
13 has name_sep    => (
14    is => 'ro',
15    default => quote_sub q{ '.' },
16 );
17
18 with 'SQL::Translator::Generator::Role::Quote';
19
20 sub BUILD {
21    my $self = shift;
22
23    unless (ref($self->quote_chars)) {
24       if ($self->quote_chars) {
25          $self->quote_chars([$self->quote_chars])
26       } else {
27          $self->quote_chars([])
28       }
29    }
30
31    $self
32 }
33
34 1;