There's more than one way to do things | |
PerlMonks |
Signal handlers for POE::Component::*by pope (Friar) |
on Sep 24, 2005 at 11:02 UTC ( [id://494763]=perlquestion: print w/replies, xml ) | Need Help?? |
pope has asked for the wisdom of the Perl Monks concerning the following question: Dear brother monks, I need some wisdom and enlightenment. I've just started using POE since my project gets bigger and much more complex to manage. Things go fine until I need to install signal handlers for POE::Component::Server::HTTP. I think the most logical place to install a signal handler for a POE component is through Started option which I found to be available for POE::Component:Server::TCP and POE::Component::Client::TCP. Since I couldn't find one for PoCo::Server::HTTP, I wrote my own HTTP server component which is much simpler but contains everything I need. But then again I face the same problem when I want to add logging facility to the HTTP server component. I choose POE::Component::Logger since it looks like the easiest one to use. There is no such thing like Started option. Things are worse since there is no means to pass custom inline_states. I saw InlineStates option to those PoCo::*::TCP components. My question is, what is the common way / best practice to install a signal handler for a component which doesn't have Started and InlineStates options?
Back to
Seekers of Perl Wisdom
|
|