Blob Blame Raw
--- Mail-Mbox-MessageParser-1.5002/lib/Mail/Mbox/MessageParser.pm	2009-08-09 21:14:47.000000000 +0100
+++ Mail-Mbox-MessageParser-1.5002/lib/Mail/Mbox/MessageParser.pm	2010-06-01 21:28:41.820260814 +0100
@@ -293,8 +293,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 my $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 +304,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))
   {