From: Matt S Trout Date: Wed, 27 Mar 2019 01:21:55 +0000 (+0000) Subject: only remove a leading - if word char following to avoid murdering e.g. -- X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d781a1221fb3d2ac1720845cc52b0af7525fc596;p=scpubgit%2FQ-Branch.git only remove a leading - if word char following to avoid murdering e.g. -- --- diff --git a/lib/SQL/Abstract.pm b/lib/SQL/Abstract.pm index 2661082..0eff852 100644 --- a/lib/SQL/Abstract.pm +++ b/lib/SQL/Abstract.pm @@ -703,7 +703,7 @@ sub _expand_expr_hashpair_op { my ($self, $k, $v) = @_; my $op = $k; - $op =~ s/^-// if length($op) > 1; + $op =~ s/^-(?=\w)//; $self->_assert_pass_injection_guard($op); # Ops prefixed with -not_ get converted