op dwim should require *only* non-word chars
[dbsrgits/SQL-Abstract.git] / lib / SQL / Abstract.pm
index 40ff82d..74f359b 100644 (file)
@@ -963,7 +963,7 @@ sub _expand_hashpair {
   }
   if ($k =~ /^-./) {
     return $self->_expand_hashpair_op($k, $v);
-  } elsif ($k =~ /^[^\w]/i) {
+  } elsif ($k =~ /^\W+$/) {
     my ($lhs, @rhs) = ref($v) eq 'ARRAY' ? @$v : $v;
     return $self->_expand_op(
       -op, [ $k, $self->expand_expr($lhs, -ident), @rhs ]