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/Config.pm | 2 -- Bugzilla/Util.pm | 8 ++++---- checksetup.pl | 4 +--- docs/xml/Bugzilla-Guide.xml | 3 +-- docs/xml/installation.xml | 5 ++--- t/001compile.t | 8 ++++---- 6 files changed, 12 insertions(+), 18 deletions(-) diff --git a/Bugzilla/Config.pm b/Bugzilla/Config.pm index fe58e0282..b1b0d6667 100644 --- a/Bugzilla/Config.pm +++ b/Bugzilla/Config.pm @@ -264,8 +264,6 @@ sub write_params { my $datadir = bz_locations()->{'datadir'}; my $param_file = "$datadir/params"; - # This only has an affect for Data::Dumper >= 2.12 (ie perl >= 5.8.0) - # Its just cosmetic, though, so that doesn't matter local $Data::Dumper::Sortkeys = 1; my ($fh, $tmpname) = File::Temp::tempfile('params.XXXXX', 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); diff --git a/checksetup.pl b/checksetup.pl index 6d2037b9e..81d4a819f 100755 --- a/checksetup.pl +++ b/checksetup.pl @@ -43,7 +43,7 @@ ###################################################################### use strict; -use 5.008; +use 5.008001; use File::Basename; use Getopt::Long qw(:config bundling); use Pod::Usage; @@ -56,8 +56,6 @@ use Bugzilla::Constants; use Bugzilla::Install::Requirements; use Bugzilla::Install::Util qw(install_string get_version_and_os); -require 5.008001 if ON_WINDOWS; # for CGI 2.93 or higher - ###################################################################### # Live Code ###################################################################### diff --git a/docs/xml/Bugzilla-Guide.xml b/docs/xml/Bugzilla-Guide.xml index 0d503eb06..1e8b308bc 100644 --- a/docs/xml/Bugzilla-Guide.xml +++ b/docs/xml/Bugzilla-Guide.xml @@ -45,8 +45,7 @@ Bugzilla Documentation"> - - + ]> diff --git a/docs/xml/installation.xml b/docs/xml/installation.xml index 3a31f2a8c..0d321e0d9 100644 --- a/docs/xml/installation.xml +++ b/docs/xml/installation.xml @@ -1,5 +1,5 @@ - + Installing Bugzilla @@ -54,8 +54,7 @@ Install Perl - (&min-perl-ver; or above for non-Windows platforms; &min-perl-ver-win; - for Windows) + (&min-perl-ver; or above) diff --git a/t/001compile.t b/t/001compile.t index 7d0bc0181..fdbe875e3 100644 --- a/t/001compile.t +++ b/t/001compile.t @@ -36,11 +36,11 @@ use Test::More tests => scalar(@Support::Files::testitems); use DBI; my @DBI_drivers = DBI->available_drivers; -# Bugzilla requires Perl 5.8.0 now. Checksetup will tell you this if you run it, but +# Bugzilla requires Perl 5.8.1 now. Checksetup will tell you this if you run it, but # it tests it in a polite/passive way that won't make it fail at compile time. We'll -# slip in a compile-time failure if it's missing here so a tinderbox on < 5.8 won't -# pass and mistakenly let people think Bugzilla works on any perl below 5.8. -require 5.008; +# slip in a compile-time failure if it's missing here so a tinderbox on < 5.8.1 won't +# pass and mistakenly let people think Bugzilla works on any perl below 5.8.1. +require 5.008001; # Capture the TESTOUT from Test::More or Test::Builder for printing errors. # This will handle verbosity for us automatically. -- cgit v1.2.3-24-g4f1b