Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Object Methods with POE::Kernel's alarm?by dynis (Initiate) |
on Jan 19, 2009 at 22:26 UTC ( [id://737414]=perlquestion: print w/replies, xml ) | Need Help?? |
dynis has asked for the wisdom of the Perl Monks concerning the following question:
Hi all, I'm trying to use POE's alarm/delay methods, but I would like to have it call an object method. The examples provided look like this:
So here the methods called are 'tick' and 'tock', and they are delayed 1 second to create an example clock. In my method I have an object $self, so I'm trying to do something more like this...
.. to wait 5 seconds before calling $self->method(). I've tried different variants using references to the object method and such, but nothing seems to work properly. Does anyone know how to do this or can anyone provide an alternative way to delay a method call while still allowing the application to go about its business (allow POE to handle events, etc)?
Back to
Seekers of Perl Wisdom
|
|