Date: Sat, 28 Jan 2012 03:41:06 GMT From: Rickie Kerndt <kerndtr@kerndt.com> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/164560: [patch] mhonarc's deprecated use of defined() Message-ID: <201201280341.q0S3f6ua072044@red.freebsd.org> Resent-Message-ID: <201201280350.q0S3o4wx026253@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 164560 >Category: ports >Synopsis: [patch] mhonarc's deprecated use of defined() >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Sat Jan 28 03:50:04 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Rickie Kerndt >Release: 8.2 >Organization: >Environment: FreeBSD VMstubing.eug.kerndt.com 8.2-RELEASE-p3 FreeBSD 8.2-RELEASE-p3 #0: Tue Sep 27 18:07:27 UTC 2011 root@i386-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC i386 >Description: Mhonarc version 2.6.18 when run with perl 10.14.2 complains about deprecated use of defined(%a_hash) statements. I've replaced these statements in the code where they occur and have generated the attached patch file(s). Since there is no maintainer for this port and that I have been using it for a number of years and will likely continue to do so, I am offering to become the maintainer. I've changed as much in the Makefile. >How-To-Repeat: Run mhonarc with perl 10.14.2. >Fix: See attached patch file(s) Patch attached with submission follows: --- Makefile.orig 2012-01-17 06:01:21.000000000 -0800 +++ Makefile 2012-01-22 03:06:18.000000000 -0800 @@ -7,12 +7,13 @@ PORTNAME= mhonarc PORTVERSION= 2.6.18 +PORTREVISION= 1 CATEGORIES= www mail MASTER_SITES= http://www.mhonarc.org/release/MHonArc/tar/ \ http://www.oac.uci.edu/indiv/ehood/tar/ DISTNAME= MHonArc-${PORTVERSION} -MAINTAINER= ports@FreeBSD.org +MAINTAINER= kerndtr@kerndt.com COMMENT= WWW front end for mail archives USE_BZIP2= Yes --- ./lib/mhamain.pl.orig 2012-01-16 14:28:02.000000000 -0800 +++ ./lib/mhamain.pl 2012-01-16 14:31:22.000000000 -0800 @@ -1561,7 +1561,7 @@ ## Create Index2MsgId if not defined ## sub defineIndex2MsgId { - if (!defined(%Index2MsgId)) { + if (!(%Index2MsgId)) { foreach (keys %MsgId) { $Index2MsgId{$MsgId{$_}} = $_; } --- ./lib/mhopt.pl.orig 2012-01-16 14:32:41.000000000 -0800 +++ ./lib/mhopt.pl 2012-01-16 14:33:10.000000000 -0800 @@ -864,7 +864,7 @@ ## sub update_data_2_1_to_later { # we can preserve filter arguments - if (defined(%main::MIMEFiltersArgs)) { + if (%main::MIMEFiltersArgs) { warn qq/ preserving MIMEARGS...\n/; %readmail::MIMEFiltersArgs = %main::MIMEFiltersArgs; $IsDefault{'MIMEARGS'} = 0; --- ./lib/readmail.pl.orig 2012-01-16 14:33:30.000000000 -0800 +++ ./lib/readmail.pl 2012-01-16 14:35:37.000000000 -0800 @@ -117,9 +117,9 @@ ## set to true. %MIMEDecoders = () - unless defined(%MIMEDecoders); + unless (%MIMEDecoders); %MIMEDecodersSrc = () - unless defined(%MIMEDecodersSrc); + unless (%MIMEDecodersSrc); ## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ## %MIMECharSetConverters is the associative array for storing functions @@ -153,9 +153,9 @@ ## string. %MIMECharSetConverters = () - unless defined(%MIMECharSetConverters); + unless (%MIMECharSetConverters); %MIMECharSetConvertersSrc = () - unless defined(%MIMECharSetConvertersSrc); + unless (%MIMECharSetConvertersSrc); ## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ## %MIMEFilters is the associative array for storing functions that @@ -180,9 +180,9 @@ ## that all functions are defined before invoking MAILread_body. %MIMEFilters = () - unless defined(%MIMEFilters); + unless (%MIMEFilters); %MIMEFiltersSrc = () - unless defined(%MIMEFiltersSrc); + unless (%MIMEFiltersSrc); ## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ## %MIMEFiltersArgs is the associative array for storing any optional @@ -196,7 +196,7 @@ ## listed for a function if both are applicable. %MIMEFiltersArgs = () - unless defined(%MIMEFiltersArgs); + unless (%MIMEFiltersArgs); ## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ## %MIMEExcs is the associative array listing which data types @@ -206,7 +206,7 @@ ## Values => <should evaluate to a true expression> %MIMEExcs = () - unless defined(%MIMEExcs); + unless (%MIMEExcs); ## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ## %MIMEIncs is the associative array listing which data types @@ -220,7 +220,7 @@ ## be used to only allow a well-defined set of content-types. %MIMEIncs = () - unless defined(%MIMEIncs); + unless (%MIMEIncs); ## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ## %MIMECharsetAliases is a mapping of charset names to charset names. @@ -231,7 +231,7 @@ ## Values => real charset name ## %MIMECharsetAliases = () - unless defined(%MIMECharsetAliases); + unless (%MIMECharsetAliases); ##--------------------------------------------------------------------------- ## Text entity-related variables >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201201280341.q0S3f6ua072044>