ports/158646: sysutils/flexbackup shows a perl deprecated warning with perl 5.12
B.Euler
olodin at edain.de
Mon Jul 4 20:20:08 UTC 2011
>Number: 158646
>Category: ports
>Synopsis: sysutils/flexbackup shows a perl deprecated warning with perl 5.12
>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: Mon Jul 04 20:20:07 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator: B.Euler
>Release: FreeBSD 8.1-RELEASE amd64
>Organization:
-
>Environment:
System: FreeBSD server.local 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Mon Jul 19 02:36:49 UTC 2010 root at mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64
>Description:
The port sysutils/flexbackup shows a perl deprecated warning when perl version 5.12 is used.
I have recently updated to 5.12 an noticed this warning when running flexbackup:
defined(%hash) is deprecated at /usr/local/bin/flexbackup line 1053.
(Maybe you should just omit the defined()?)
defined(%hash) is deprecated at /usr/local/bin/flexbackup line 4885.
(Maybe you should just omit the defined()?)
>How-To-Repeat:
* Install flexbackup from ports
* update to perl-1.12 (if not already installed)
* call flexbackup like "flexbackup -dir /tmp -device /usr/home
>Fix:
Based on this patch
http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/app-backup/flexbackup/files/flexbackup-1.2.1-perl-5.12-deprecation-warning.patch?view=log
a modification the latest flexbackup version 1.2.1_4 worked for me:
--- flexbackup.~1~ 2010-10-09 13:19:27.633694860 +0200
+++ flexbackup 2010-10-09 13:21:52.396818511 +0200
@@ -133,6 +133,9 @@
# tar has a limit of this many chars in its volume label
$::tar_max_label = 99;
+# Define the prune hash to avoid warnings with perl 5.12
+use vars qw( %prune );
+
# Get commandline flags
%::opt = ();
if (! &::GetOptions(\%::opt,
@@ -1050,6 +1053,6 @@
} else {
$prunekey = $dir;
}
- if (defined(%{$::prune{$prunekey}})) {
+ if (defined($prune{$prunekey})) {
&log("| NOTE: \$prune is ignored for type=dump");
}
@@ -4885,7 +4885,7 @@
$prunekey = $dir;
}
- if (defined(%{$::prune{$prunekey}})) {
+ if (defined($prune{$prunekey})) {
my $rex;
# FreeBSD needs -E (above) and no backslashes around the (|) chars
if ($::uname =~ /FreeBSD/) {
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list