Dawit has asked for the wisdom of the Perl Monks concerning the following question:

hello there,
I wrote a skript on Debian Lenny with Mail::IMAPClient and it works fine
but the destiny server is an Debian etch system
so i copy it on a test etch system and it doesn't work very well...
print Dumper $imap->folders(); $folder="INBOX"; if($imap->selectable($folder)){ print "entrace the inbox\n"; $imap->select($folder) or die "Could not select: $@\n"; }

error mesage for ->folders() line:
Use of uninitialized value in pattern match (m//) at /usr/share/perl5/Mail/IMAPClient.pm line 2168.

error message for ->select() line:
3 BAD Unknown command d6if512534fga.8

i don't no why it's wrong
i have read the IMAPClient.pm again and again and again
the functions are there but it fails
is this a known problem
or i am so stupid ^^?!
Virtuelle/live machine(s) (etch):
dpkg -l | grep libmail => libmail-imapclient-perl 2.2.9+deb-4

Local machine (Lenny):
dpkg -l | grep libmail => libmail-imapclient-perl 3.08-2

it's very annoying that it works on lenny but not on etch the problem is i can't change the versions on the destiny machines, no permission ....

Replies are listed 'Best First'.
Re: Mail::IMAPClient + Folder
by Corion (Patriarch) on Sep 19, 2008 at 09:23 UTC

    There have been a lot of changes to Mail::IMAPClient between 3.08 and 2.2.9. At least, search.cpan.org does not want to display the changes, but at least you can download them. My suggestion is that you read the documentation for both module versions and the Changes file and see if there are any hints on an API change or new requisites. You can of course also inspect /usr/share/perl5/Mail/IMAPClient.pm line 2168 on the production machine to see a propable cause for the error. That's why Perl tells you the information.

    Normally, you can't expect that a new major version will be piece-by-piece identical to an older version, so developing for a newer version than you have in production is not a viable strategy.

    If all else fails, Yes, even you can use CPAN and stray away from the walled garden that is Debian. Of course I as technical administrator would hit you over the head for not using a Debian package when everything else is available as a Debian package and the company rules are to use Debian packages.