On Fri, Feb 22, 2002 at 09:16:18AM -0800, Scott Beck wrote:
> Hi all,
> 
> I just finished POE::Component::Client::POP3, it works relativly well but needs
> some stress testing. I plan to release it on the cpan after I get some feedback.
> You can download it at:
>     http://24.76.71.135/POE-Component-Client-POP3-0.01.tar.gz
> 
> Any comments or suggestions are very welcome.

I've already looked at it, and Scott's not telling the entire story.
His component uses at least three interesting techniques that might
help authors who normally aren't interested in the pop3 protocol.

He's using an event registry similar to POE::Component::IRC's so that
sessions can attach and detach from the component.  Events can be
registered at the component's creation time, and they can be renamed.
This officially is a recurring pattern and should be documented
somewhere.

He's using a queue to pipeline commands and manage the protocol state.
Look for $heap->{stack} throughout POP3.pm.  This seems like a tidy
way to solve the problem of holding commands until they can be
performed.

He's also using his component's symbol table as a jump table in his
handler_input() function.  That's effectively the same technique as
http://poe.perl.org/?POE_Cookbook/Distributing_Events but without the
overhead of call() or the latency of post() or yield().  This one
should be documented in the cookbook.

-- Rocco Caputo / [EMAIL PROTECTED] / poe.perl.org / poe.sf.net

Reply via email to