Re: Accessors

Pedro Melo <[email protected]>
Newsgroups gmane.comp.lang.perl.poe
Message-ID <[email protected]>
On Apr 9, 2008, at 10:22 PM, Rocco Caputo wrote:
> My favorite method (har) is to wrap the session in an object that  
> acts as its interface and also its storage.   
> POE::Component::Client::KeepAlive is implemented this way.
>
> In brief, new() creates the object and spawns a hidden  
> POE::Session.  object_states map events to private methods on the  
> new object.  Public methods on the object act as accessors and  
> mutators, and can be used to send commands into the hidden session.

+1. All my POE code works this way. I think it's the best match  
between POE and OO-Perl.

Best regards,
-- 
Pedro Melo
Blog: http://www.simplicidade.org/notes/
XMPP ID: [email protected]
Use XMPP!
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.