You must do an undef on the $cyrus object once you are done using it to
close the session properly.
Look at the cyradm code for an example.
example my $imap=new $cyrus::IMAP::Admin;
Once you're done using the $imap object. Close the session by:
$imap=undef;
Alain
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Gary Mills
Sent: Sunday, July 15, 2001 5:11 PM
To: [EMAIL PROTECTED]
Subject: Tracking down a perl error
I've posted this several times, and it's never shown up on the
mailing list. What's wrong?
Does anyone know how to track down this perl error? I asked on a couple
of perl newsgroups, and got no response. I'm using Cyrus::IMAP::Admin,
Cyrus::SIEVE::managesieve, and CGI. The error is...
Use of uninitialized value in subroutine entry at
/usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris/Cyrus/IMAP/Admin.pm line
78 during global destruction.
(in cleanup) client is not of type Cyrus::IMAP at
/usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris/Cyrus/IMAP/Admin.pm line
78 during global destruction.
Here's a piece of Admin.pm, showing line 78...
# yes, this is ugly. but the overhead is minimized this way.
sub AUTOLOAD {
use vars qw($AUTOLOAD);
no strict 'refs';
$AUTOLOAD =~ s/^.*:://;
my $sub = $Cyrus::IMAP::{$AUTOLOAD};
----------------------------------------
*$AUTOLOAD = sub { &$sub($_[0]->{cyrus}, @_[1..$#_]); };
----------------------------------------
goto &$AUTOLOAD;
}
--
-Gary Mills- -Unix Support- -U of M Academic Computing and Networking-