* [Sun, May 08, 2011 at 09:02:39PM -0600] Bob Proulx:
Package: maildirsync
Version: 1.1-2
Severity: normal
Tags: patch

Since a recent perl update I have been getting the following warnings.

 UNIVERSAL->import is deprecated and will be removed in a future perl at 
/usr/bin/maildirsync line 13

The documentation at the bottom here describes the deprecation and why.

 http://perldoc.perl.org/UNIVERSAL.html

This page seems suggesting something like (sorry, cannot produce a real diff just now):

use Scalar::Util 'reftype';
...
if ( reftype($OPT{$optname}) ne 'ARRAY' ) {

Any opinion on this?

CCing debian-perl for more hints. Also, as maildirsync has been orphaned, could any of you prepare an NMU for taking care of this?
Thanks,
Gian Piero.

Below the patch from Bob for reference.

--- /usr/bin/maildirsync        2007-07-20 08:55:47.000000000 -0600
+++ /usr/local/bin/maildirsync  2011-05-08 20:54:09.000000000 -0600
@@ -10,7 +10,6 @@
use IO::Handle;
use IPC::Open2;
use Fcntl qw(SEEK_SET);
-use UNIVERSAL qw(isa);
use strict;
require 5.006;

@@ -93,7 +92,7 @@
        exit_with_error("Invalid parameter value: $optname: $value") if $value 
!~ /^$regex$/;
    }
    verbose 4 => "add option $optname = ".($value || "");
-    if (!isa($OPT{$optname}, 'ARRAY')) {
+    if (! eval { $OPT{$optname}->isa('ARRAY') }) {
        $OPT{$optname} = $value;
    } else {
        push @{$OPT{$optname}}, $value;



--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to