only split identifiers when we have a separator
Matt S Trout [Wed, 9 Oct 2013 14:54:25 +0000 (14:54 +0000)]
lib/SQL/Abstract/Converter.pm

index cf168cd..d2a3741 100644 (file)
@@ -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 {