in reply to Re: IMAP & IMAPS module?
in thread IMAP & IMAPS module?

Sorry, I seem to have omitted that important detail:

Authen::Simple and co are there to make it easy for you to add authentication to your perl code. So, if you want to authenticate users against an LDAP server? There's Authen::Simple::LDAP. How about an active directory server? Authen::Simple::ActiveDirectory. I'm building a catalyst app that will authenticate against an IMAP server. Hence, Authen::Simple::IMAP. So, I'm not adding authentication to an IMAP service, I'm using an IMAP server as my credential provider.

Replies are listed 'Best First'.
Re^3: IMAP & IMAPS module?
by shmem (Chancellor) on Mar 12, 2009 at 09:50 UTC

    Ah, ok. Since the bits Net::IMAP::Simple::Plus provides are irrelevant for pure authentication, and you still would prefer Net::IMAP::Simple::Plus, you could try to load Net::IMAP::Simple::Plus and fall back to Net::IMAP::Simple via a BEGIN block and string eval:

    package Authen::Simple::LDAP; BEGIN { eval "use Net::IMAP::Simple::Plus;"; if ($@) { eval "use Net::IMAP::Simple;"; die $@ if $@; } }