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-Tag: v2.000000~3^2~319 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=1ca3acb66f4ba8bbe2095a9a8d3f4de4acea51b6;p=dbsrgits%2FSQL-Abstract.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 50627e8..ea5526f 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