condense op handling
Matt S Trout [Wed, 27 Mar 2019 01:22:40 +0000 (01:22 +0000)]
lib/SQL/Abstract.pm

index ea5526f..95cd17c 100644 (file)
@@ -702,8 +702,7 @@ sub _expand_expr_hashpair_scalar {
 sub _expand_expr_hashpair_op {
   my ($self, $k, $v) = @_;
 
-  my $op = $k;
-  $op =~ s/^-(?=\w)//;
+  (my $op = $k) =~ s/^-(?=\w)//;
   $self->_assert_pass_injection_guard($op);
 
   # Ops prefixed with -not_ get converted