Skip Menu |

This queue is for tickets about the Mail-IMAPClient CPAN distribution.

Report information
The Basics
Id: 65470
Status: resolved
Priority: 0/
Queue: Mail-IMAPClient

People
Owner: PLOBBES [...] cpan.org
Requestors: gilles.lamiral [...] laposte.net
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 3.27



Subject: Bugfix to a useless warning in message_to_file() in 3.26
Date: Sat, 05 Feb 2011 12:22:40 +0100
To: bug-Mail-IMAPClient [...] rt.cpan.org
From: Gilles LAMIRAL <gilles.lamiral [...] laposte.net>
Hello, Just a small bugfix for a warning in message_to_file() in 3.26 ligne 788 N-1 warnings "Use of uninitialized value in open at Mail-IMAPClient-3.26/lib/Mail/IMAPClient.pm line 788, <GEN2> line 1." one per message_to_file() call. Issue: else { open( $fh, ">>", $file ); Fix: else { $$file = '' if ( not defined( $$file ) ) ; open( $fh, ">>", $file ); Maybe it can be fixed elsewhere. -- Au revoir, 09 51 84 42 42 Gilles Lamiral. France, Baulon (35580) 06 20 79 76 06
agreemsg - same problem. I might suggest: --- IMAPClient.pm 2011-01-31 20:35:13.000000000 -0800 +++ /usr/lib/perl5/site_perl/5.8.8/Mail/IMAPClient.pm 2011-02-10 17:52:41.000000000 -0800 @@ -785,6 +785,7 @@ $fh = $file; } else { + ${$file} = q{} if ref $file eq 'SCALAR' && !defined ${$file}; open( $fh, ">>", $file ); unless ( defined($fh) ) { $self->LastError("Unable to open file '$file': $!");
Gilles and Mark, Thank you for the bug report and patch. I'll have a new release out soon so that 3.26 doesn't become too widespread with this annoying warning.
Mail::IMAPClient 3.27 has been released and is available on CPAN!