summaryrefslogtreecommitdiffstats
path: root/extensions
diff options
context:
space:
mode:
authorDave Lawrence <dlawrence@mozilla.com>2012-12-28 17:35:04 +0100
committerDave Lawrence <dlawrence@mozilla.com>2012-12-28 17:35:04 +0100
commitb10a11cc341499745c0495406bd207db4982b322 (patch)
tree25a572c760e8de08a23470c67109dd29059a6cf9 /extensions
parentb300c83e7b907f14c9f94a50370aab6f8fb3d1a7 (diff)
parentfc18ef1ad344a14174332cd04a04d8182ab85d4b (diff)
downloadbugzilla-b10a11cc341499745c0495406bd207db4982b322.tar.gz
bugzilla-b10a11cc341499745c0495406bd207db4982b322.tar.xz
merged with bugzilla/4.2
Diffstat (limited to 'extensions')
-rw-r--r--extensions/Example/Extension.pm8
1 files changed, 7 insertions, 1 deletions
diff --git a/extensions/Example/Extension.pm b/extensions/Example/Extension.pm
index 3208d701a..fe29beb0b 100644
--- a/extensions/Example/Extension.pm
+++ b/extensions/Example/Extension.pm
@@ -459,7 +459,13 @@ sub error_catch {
my $new_error_msg = "Ah ah, you tried to access $page_id? Good try!";
$new_error_msg = html_quote($new_error_msg);
# There are better tools to parse an HTML page, but it's just an example.
- $$page =~ s/(?<=<td id="error_msg" class="throw_error">).*(?=<\/td>)/$new_error_msg/si;
+ # Since Perl 5.16, we can no longer write "class" inside look-behind
+ # assertions, because "ss" is also seen as the german ß character, which
+ # makes Perl 5.16 complain. The right fix is to use the /aa modifier,
+ # but it's only understood since Perl 5.14. So the workaround is to write
+ # "clas[s]" instead of "class". Stupid and ugly hack, but it works with
+ # all Perl versions.
+ $$page =~ s/(?<=<td id="error_msg" clas[s]="throw_error">).*(?=<\/td>)/$new_error_msg/si;
}
sub flag_end_of_update {