From: Matt S Trout Date: Sun, 31 Jul 2011 02:07:30 +0000 (+0000) Subject: allow \n in op names - not sure why this ever worked, but the scope guard test uses... X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e20097dda9e1205a6e358fc0d789b8b002d18c32;p=dbsrgits%2FSQL-Abstract.git allow \n in op names - not sure why this ever worked, but the scope guard test uses it and I don't see an immediate reason to disallow it --- diff --git a/lib/SQL/Abstract.pm b/lib/SQL/Abstract.pm index a076f84..3b7bee6 100644 --- a/lib/SQL/Abstract.pm +++ b/lib/SQL/Abstract.pm @@ -618,7 +618,7 @@ sub _where_op_VALUE { sub _where_hashpair_to_dq { my ($self, $k, $v) = @_; - if ($k =~ /-(.*)/) { + if ($k =~ /-(.*)/s) { my $op = uc($1); if ($op eq 'AND' or $op eq 'OR') { return $self->_where_to_dq($v, $op); @@ -634,7 +634,7 @@ sub _where_hashpair_to_dq { ); } else { my @args = do { - if (ref($v) eq 'HASH' and keys(%$v) == 1 and (keys %$v)[0] =~ /-(.*)/) { + if (ref($v) eq 'HASH' and keys(%$v) == 1 and (keys %$v)[0] =~ /-(.*)/s) { my $op = uc($1); my ($inner) = values %$v; $self->_op_to_dq(