develooper Front page | perl.poe | Postings from April 2008

Accessors

Thread Next
From:
John R.
Date:
April 8, 2008 17:03
Subject:
Accessors
 From the 1.0 documentation (very good by the way):

"call() returns the value returned by the EVENT_NAME handler.  It can do
this because the handler is invoked before call() returns.  call() can
therefore be used as an accessor, although there are better ways to
accomplish simple accessor behavior."

(from POE::Kernel)

I don't see reference to the better ways so they probably are standard 
perlish ways of doing things that I am having difficulty figuring out. 
What other ways are there to accomplish accessors that provide access to 
POE things like the heap?  I am doing calls within a session and between 
sessions.  Should I pass the heap, kernel, etc as arguments to regular 
sub calls?

Thanks,

John

Thread Next


Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About