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 --- Bugzilla/Template.pm | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'Bugzilla/Template.pm') diff --git a/Bugzilla/Template.pm b/Bugzilla/Template.pm index 3cbff4733..48899cd78 100644 --- a/Bugzilla/Template.pm +++ b/Bugzilla/Template.pm @@ -8,7 +8,7 @@ package Bugzilla::Template; -use 5.10.1; +use 5.14.0; use strict; use warnings; @@ -159,9 +159,7 @@ sub quoteUrls { # mailto can't contain space or #, so we don't have to bother for that # Do this by replacing matches with \x{FDD2}$count\x{FDD3} # \x{FDDx} is used because it's unlikely to occur in the text - # and are reserved unicode characters. We disable warnings for now - # until we require Perl 5.13.9 or newer. - no warnings 'utf8'; + # and are reserved unicode characters. # If the comment is already wrapped, we should ignore newlines when # looking for matching regexps. Else we should take them into account. @@ -247,9 +245,9 @@ sub quoteUrls { # Also, we can't use $bug_re?$comment_re? because that will match the # empty string my $bug_word = template_var('terms')->{bug}; - my $bug_re = qr/\Q$bug_word\E$s*\#?$s*(\d+)/i; + my $bug_re = qr/\Q$bug_word\E$s*\#?$s*(\d+)/ai; my $comment_word = template_var('terms')->{comment}; - my $comment_re = qr/(?:\Q$comment_word\E|comment)$s*\#?$s*(\d+)/i; + my $comment_re = qr/(?:\Q$comment_word\E|comment)$s*\#?$s*(\d+)/ai; $text =~ s~\b($bug_re(?:$s*,?$s*$comment_re)?|$comment_re) ~ # We have several choices. $1 here is the link, and $2-4 are set # depending on which part matched -- cgit v1.2.3-24-g4f1b