ports/170293: Port japanese/a2ps generates a warning message on Perl 5.16
Kenji Rikitake
kenji.rikitake at acm.org
Tue Jul 31 06:30:12 UTC 2012
>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 at 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:
More information about the freebsd-ports-bugs
mailing list