CC: | mihai.bazon [...] gmail.com |
Subject: | Net::IMAP::Client - error after logout |
Date: | Fri, 24 Jul 2009 09:49:17 -0400 |
To: | bug-Net-IMAP-Client [...] rt.cpan.org |
From: | Harry Levinson <harry.levinson [...] gmail.com> |
I am trying your NET::IMAP::Client module. Version 0.92. .
A short test works fine except when exiting. The logout method seems to
close the socket, but when I execute an exit command, the destructor doesn't
seem to realize that the socket is already closed.
main::(t2.pl:33): $imap->logout;
DB<1>
main::(t2.pl:35): exit;
DB<1>
setsockopt() on closed socket GEN0 at /usr/lib/perl/5.8/IO/Socket.pm line
247.
at /usr/lib/perl/5.8/IO/Socket.pm line 247
IO::Socket::setsockopt('IO::Socket::SSL=GLOB(0x872062c)', 1, 9, 1)
called at /usr/lib/perl/5.8/IO/Socket.pm line 263
IO::Socket::sockopt('IO::Socket::SSL=GLOB(0x872062c)', 9, 1) called at
/usr/local/share/perl/5.8.8/Net/IMAP/Client.pm line 589
Net::IMAP::Client::_get_socket('Net::IMAP::Client=HASH(0x87204b8)')
called at /usr/local/share/perl/5.8.8/Net/IMAP/Client.pm line 50
eval {...} called at /usr/local/share/perl/5.8.8/Net/IMAP/Client.pm line
49
Net::IMAP::Client::DESTROY('Net::IMAP::Client=HASH(0x87204b8)') called
at t2.pl line 0
eval {...} called at t2.pl line 0
If useful, here is the complete test
use Net::IMAP::Client;
my $imap = Net::IMAP::Client->new(
server => 'exchange.kendall.corp.akamai.com',
user => 'username',
pass => '*****',
ssl => 1, # (use SSL? default
no)
port => 993, # (but defaults are
sane)
uid_mode => 0 # Not sure why UID is
default
) or die "Could not connect to IMAP
server";
$imap->login or
die('Login failed: ' . $imap->last_error);
my $capab = $imap->capability;
$imap->select('INBOX') or die "Could not select
INBOX";
$imap->logout;
exit;