From 86fb87f1a65a17e7a86fe71b06d57767b0b3ea3b Mon Sep 17 00:00:00 2001 From: Frédéric Buclin Date: Mon, 29 Feb 2016 19:34:34 +0100 Subject: Bug 1136137: Require Perl 5.14 r=dkl --- extensions/Example/Extension.pm | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'extensions/Example/Extension.pm') diff --git a/extensions/Example/Extension.pm b/extensions/Example/Extension.pm index 40ee9c2d1..ef27200ac 100644 --- a/extensions/Example/Extension.pm +++ b/extensions/Example/Extension.pm @@ -7,7 +7,7 @@ package Bugzilla::Extension::Example; -use 5.10.1; +use 5.14.0; use strict; use warnings; @@ -479,13 +479,7 @@ 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. - # 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>)/$new_error_msg/si; + $$page =~ s/
\K(.*)/$new_error_msg
$1/siaa; } sub flag_end_of_update { -- cgit v1.2.3-24-g4f1b