Do you see a chance to merge it with Net_Cyrus from Horde, letting the user to select the "backend" being either Net_Socket or Net_IMAP? We would need to use Net_IMAP as a proxy class instead of by inheritance, just like Net_Socket is used in our class.