Commit | Line | Data |
c13f5f6a |
1 | package # 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 |
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 | |
598a2461 |
18 | with 'SQL::Translator::Generator::Role::Quote'; |
19 | |
27ae9ae7 |
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 | |
27ae9ae7 |
34 | 1; |