From 1226f7f22e4a706b1755d359c07736575ed3af2b Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Thu, 9 Aug 2007 17:36:07 +0000 Subject: Bug 361149: Bugzilla now requires Perl 5.8.1 or newer (Perl 5.8.0 throws warnings about deprecated pseudo-hashes) - Patch by Frédéric Buclin r/a=mkanat MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bugzilla/Util.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Bugzilla/Util.pm') diff --git a/Bugzilla/Util.pm b/Bugzilla/Util.pm index c6560dd11..87caa0527 100644 --- a/Bugzilla/Util.pm +++ b/Bugzilla/Util.pm @@ -106,8 +106,8 @@ sub html_light_quote { require HTML::Parser; }; - # We need utf8_mode() from HTML::Parser 3.40 if running Perl >= 5.8. - if ($@ || ($] >= 5.008 && $HTML::Parser::VERSION < 3.40)) { # Package(s) not installed. + # We need utf8_mode() from HTML::Parser 3.40. + if ($@ || $HTML::Parser::VERSION < 3.40) { # Package(s) not installed. my $safe = join('|', @allow); my $chr = chr(1); @@ -171,10 +171,10 @@ sub html_light_quote { comment => 0, process => 0); - # Avoid filling the web server error log with Perl 5.8.x. + # Avoid filling the web server error log. # In HTML::Scrubber 0.08, the HTML::Parser object is stored in # the "_p" key, but this may change in future versions. - if ($] >= 5.008 && ref($scrubber->{_p}) eq 'HTML::Parser') { + if (ref($scrubber->{_p}) eq 'HTML::Parser') { $scrubber->{_p}->utf8_mode(1); } return $scrubber->scrub($text); -- cgit v1.2.3-24-g4f1b