X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FSQL%2FAbstract%2FTest.pm;h=c6e909c0ac144b275d015e51c1bf31b67048ef92;hb=6f01d627f158b296303694408fe7cf8dc1395483;hp=1ae1a361f3d1a59dbaf925b309a98f64c1ec4bef;hpb=4d3dc03aeed178670e3284f8ad06e69d23b5d5dd;p=dbsrgits%2FSQL-Abstract.git diff --git a/lib/SQL/Abstract/Test.pm b/lib/SQL/Abstract/Test.pm index 1ae1a36..c6e909c 100644 --- a/lib/SQL/Abstract/Test.pm +++ b/lib/SQL/Abstract/Test.pm @@ -26,6 +26,8 @@ my @unrollable_ops = ( 'HAVING', 'ORDER \s+ BY', ); +my $unrollable_ops_re = join ' | ', @unrollable_ops; +$unrollable_ops_re = qr/$unrollable_ops_re/xio; sub is_same_sql_bind { my ($sql1, $bind_ref1, $sql2, $bind_ref2, $msg) = @_; @@ -228,7 +230,7 @@ sub _parenthesis_unroll { } # if the parent operator explcitly allows it nuke the parenthesis - elsif ( grep { $ast->[0] =~ /^ $_ $/xi } @unrollable_ops ) { + elsif ( $ast->[0] =~ $unrollable_ops_re ) { push @children, $child->[1][0]; $changes++; }