Commit | Line | Data |
c13f5f6a |
1 | package # hide from pause |
fd9f0e09 |
2 | SQL::Translator::Generator::Utils; |
27ae9ae7 |
3 | |
4 | use Moo; |
5 | use Sub::Quote 'quote_sub'; |
6 | |
7 | # this should be ro, but I have to modify it in BUILD so bleh |
8 | has quote_chars => ( is => 'rw' ); |
9 | |
10 | has name_sep => ( |
11 | is => 'ro', |
12 | default => quote_sub q{ '.' }, |
13 | ); |
14 | |
598a2461 |
15 | with 'SQL::Translator::Generator::Role::Quote'; |
16 | |
27ae9ae7 |
17 | sub BUILD { |
18 | my $self = shift; |
19 | |
20 | unless (ref($self->quote_chars)) { |
21 | if ($self->quote_chars) { |
22 | $self->quote_chars([$self->quote_chars]) |
23 | } else { |
24 | $self->quote_chars([]) |
25 | } |
26 | } |
27 | |
28 | $self |
29 | } |
30 | |
27ae9ae7 |
31 | 1; |