From 592052f4b29bf95aae4435504558434133fea6bc Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Mon, 17 Sep 2012 17:35:09 +0200 Subject: [PATCH] SL::DBUpgrade bug fixes --- SL/DBUpgrade2.pm | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/SL/DBUpgrade2.pm b/SL/DBUpgrade2.pm index a74e8ae82..a39ef931b 100644 --- a/SL/DBUpgrade2.pm +++ b/SL/DBUpgrade2.pm @@ -163,7 +163,6 @@ sub process_query { if ($char eq $quote_chars[-1]) { pop(@quote_chars); } elsif (length $quote_chars[-1] > 1 - && substr($quote_chars[-1], 0, 1) eq $char && substr($_, $i, length $quote_chars[-1]) eq $quote_chars[-1]) { $i += length $quote_chars[-1] - 1; $char = $quote_chars[-1]; @@ -176,10 +175,10 @@ sub process_query { if (($char eq "'") || ($char eq "\"")) { push(@quote_chars, $char); - } elsif ($char eq '$' # start of dollar quoting - && ($tag_end = index($_, '$', $i + 1)) > -1 # ends on same line - && (do { substr($_, $i + 1, $tag_end - $i - 1); 1 }) # extract tag - && $tag =~ /^ (?= [A-Za-z_] [A-Za-z0-9_]* | ) $/x) { # tag is identifier + } elsif ($char eq '$' # start of dollar quoting + && ($tag_end = index($_, '$', $i + 1)) > -1 # ends on same line + && (do { $tag = substr($_, $i + 1, $tag_end - $i - 1); 1 }) # extract tag + && $tag =~ /^ (?= [A-Za-z_] [A-Za-z0-9_]* | ) $/x) { # tag is identifier push @quote_chars, $char = '$' . $tag . '$'; $i = $tag_end; } elsif ($char eq ";") { -- 2.20.1