As of this writing, the only module on CPAN that lets you do IMAP IDLE. Mail::IMAPClient's IDLE implementation, although it's very low-level (expect to refer to RFCs 3501 and 2177 frequently) and experimental (the author warns that its interface may change), works.
Without having otherwise used this module much, I can report that it works fine. My only real complaint is that the extensive documentation presents topics in alphabetical rather than pedagogical order, making it difficult to find what you're looking for. If you don't want to do anything fancy, you may be happier with Net::IMAP::Simple (or Net::IMAP::Simple::SSL), which also assumes less knowledge of IMAP on the part of the programmer.
A gotcha worth pointing out is that the default port remains 143 even with the Ssl option on, so don't forget to say 'Port => 993' if that's what you want.