Resurrect the DB2 precompiled grammar to which we lost the source
[dbsrgits/SQL-Translator.git] / lib / SQL / Translator / Generator / Utils.pm
CommitLineData
c13f5f6a 1package # hide from pause
fd9f0e09 2 SQL::Translator::Generator::Utils;
27ae9ae7 3
d22073f1 4# AUTHOR: Arthur Axel fREW Schmidt
5# Copyright: Same as Perl 5
6
27ae9ae7 7use Moo;
8use Sub::Quote 'quote_sub';
9
10# this should be ro, but I have to modify it in BUILD so bleh
11has quote_chars => ( is => 'rw' );
12
13has name_sep => (
14 is => 'ro',
15 default => quote_sub q{ '.' },
16);
17
598a2461 18with 'SQL::Translator::Generator::Role::Quote';
19
27ae9ae7 20sub 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
27ae9ae7 341;