From: Peter Rabbitson Date: Mon, 27 Sep 2010 06:54:06 +0000 (+0000) Subject: These 'optimizations' are silly X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b7b0f832c4f5994a3bfbe4fbc13e043964aebd2c;hp=88a899390925fcded12aedf9efab3c545db860bd;p=scpubgit%2FQ-Branch.git These 'optimizations' are silly --- diff --git a/lib/SQL/Abstract/Test.pm b/lib/SQL/Abstract/Test.pm index c6e909c..3c01661 100644 --- a/lib/SQL/Abstract/Test.pm +++ b/lib/SQL/Abstract/Test.pm @@ -27,7 +27,7 @@ my @unrollable_ops = ( 'ORDER \s+ BY', ); my $unrollable_ops_re = join ' | ', @unrollable_ops; -$unrollable_ops_re = qr/$unrollable_ops_re/xio; +$unrollable_ops_re = qr/$unrollable_ops_re/xi; sub is_same_sql_bind { my ($sql1, $bind_ref1, $sql2, $bind_ref2, $msg) = @_; diff --git a/lib/SQL/Abstract/Tree.pm b/lib/SQL/Abstract/Tree.pm index 90d3052..8805828 100644 --- a/lib/SQL/Abstract/Tree.pm +++ b/lib/SQL/Abstract/Tree.pm @@ -83,7 +83,7 @@ my @expression_start_keywords = ( ); my $exp_start_re = join ("\n\t|\n", @expression_start_keywords ); -$exp_start_re = qr/ $op_look_behind (?i: $exp_start_re ) $op_look_ahead /xo; +$exp_start_re = qr/ $op_look_behind (?i: $exp_start_re ) $op_look_ahead /x; # These are binary operator keywords always a single LHS and RHS # * AND/OR are handled separately as they are N-ary @@ -100,14 +100,14 @@ my $math_re = join ("\n\t|\n", map { "(?: (?<= [\\w\\s] | $quote_right ) | \\A )" . quotemeta ($_) . "(?: (?= [\\w\\s] | $quote_left ) | \\z )" } @math_op_keywords ); -$math_re = qr/$math_re/xo; +$math_re = qr/$math_re/x; sub _math_op_re { $math_re } my $binary_op_re = '(?: NOT \s+)? (?:' . join ('|', qw/IN BETWEEN R?LIKE/) . ')'; $binary_op_re = "(?: $op_look_behind (?i: $binary_op_re ) $op_look_ahead ) \n\t|\n $math_re"; -$binary_op_re = qr/$binary_op_re/xo; +$binary_op_re = qr/$binary_op_re/x; sub _binary_op_re { $binary_op_re }