From: Matt S Trout Date: Wed, 9 Oct 2013 14:54:25 +0000 (+0000) Subject: only split identifiers when we have a separator X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=95516ac5faf52e0c576e6a0a70c5b420756a351b;p=dbsrgits%2FSQL-Abstract.git only split identifiers when we have a separator --- diff --git a/lib/SQL/Abstract/Converter.pm b/lib/SQL/Abstract/Converter.pm index cf168cd..d2a3741 100644 --- a/lib/SQL/Abstract/Converter.pm +++ b/lib/SQL/Abstract/Converter.pm @@ -81,7 +81,15 @@ sub _ident_to_dq { my ($self, $ident) = @_; $self->_assert_pass_injection_guard($ident) unless $self->renderer_will_quote; - $self->_maybe_convert_dq(Identifier(split /\Q${\$self->identifier_sep}/, $ident)); + $self->_maybe_convert_dq( + Identifier(do { + if (my $sep = $self->identifier_sep) { + split /\Q$sep/, $ident + } else { + $ident + } + }) + ); } sub _maybe_convert_dq {