From: Ansgar Burchardt <ansgar@43-1.org>
Date: Sun, 06 Jun 2010 13:27:57 +0900
Bug-Debian: http://bugs.debian.org/582672
Bug: https://rt.cpan.org/Public/Bug/Display.html?id=58053
Subject: Fix warning with perl-5.12

--- libmail-mbox-messageparser-perl.orig/lib/Mail/Mbox/MessageParser.pm
+++ libmail-mbox-messageparser-perl/lib/Mail/Mbox/MessageParser.pm
@@ -294,7 +294,7 @@
   dprint "Calling \"$filter_command\" to decompress file \"$file_name\".";
 
   use vars qw(*OLDSTDERR);
-  open OLDSTDERR,">&STDERR" or die "Can't save STDERR: $!\n";
+  open OLDSTDERR, ">&", \*STDERR or die "Can't save STDERR: $!\n";
   open STDERR,">" . File::Spec->devnull()
     or die "Can't redirect STDERR to " . File::Spec->devnull() . ": $!\n";
 
@@ -305,7 +305,7 @@
 
   binmode $file_handle;
 
-  open STDERR,">&OLDSTDERR" or die "Can't restore STDERR: $!\n";
+  open STDERR, ">&", \*OLDSTDERR or die "Can't restore STDERR: $!\n";
 
   if (eof($file_handle))
   {
