Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 31 Jul 2012 15:29:13 +0900
From:      Kenji Rikitake <kenji.rikitake@acm.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/170293: Port japanese/a2ps generates a warning message on Perl 5.16
Message-ID:  <50177b3e.0986440a.58f2.791f@mx.google.com>
Resent-Message-ID: <201207310630.q6V6UBMg055375@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         170293
>Category:       ports
>Synopsis:       Port japanese/a2ps generates a warning message on Perl 5.16
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jul 31 06:30:11 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Kenji Rikitake
>Release:        FreeBSD 9.0-STABLE amd64
>Organization:
>Environment:
System: FreeBSD minimax.priv.k2r.org 9.0-STABLE FreeBSD 9.0-STABLE #5: Wed Jun 13 12:46:09 JST 2012 root@minimax.priv.k2r.org:/usr/obj/usr/src/sys/MINIMAX amd64

Running Perl-5.16.0 from Ports

>Description:

Executing a2ps-j generates the following warning message:

defined(@array) is deprecated at /usr/local/bin/a2ps-j line 59.
	(Maybe you should just omit the defined()?)

>How-To-Repeat:
	/usr/local/bin/a2ps-j
	
>Fix:

Apply the following patch to avoid using defined() on an array.
(See also http://perldoc.perl.org/functions/defined.html )

--- /usr/local/bin/a2ps-j	2011-10-25 23:39:11.000000000 +0900
+++ ./a2ps-j	2012-07-31 15:22:10.000000000 +0900
@@ -56,9 +56,12 @@
 @param_b4 = (10.15, 14.31, 1.40, 1.2, 8.50, 9.5, 0.29, 0.22, 0.08, 'b4');
 sub paper {
     local(*param) = 'param_' . $_[0];
-    die "Unknown paper type: $_[0]\n" unless defined @param;
-    ($width, $height, $lmargin, $smargin, $fontsize_l, $fontsize_p,
-     $portrait_header, $landscape_header, $paper_adjust, $paper_tray) = @param;
+    if (@param) {
+	($width, $height, $lmargin, $smargin, $fontsize_l, $fontsize_p,
+	 $portrait_header, $landscape_header, $paper_adjust, $paper_tray) = @param;
+    } else {
+	die "Unknown paper type: $_[0]\n";
+    }
 }
 &paper($default_paper);
 




>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?50177b3e.0986440a.58f2.791f>