Date: Mon, 4 Jul 2011 20:15:44 GMT From: "B.Euler" <olodin@edain.de> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/158646: sysutils/flexbackup shows a perl deprecated warning with perl 5.12 Message-ID: <201107042015.p64KFiRZ001207@red.freebsd.org> Resent-Message-ID: <201107042020.p64KK7SS048126@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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@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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201107042015.p64KFiRZ001207>