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?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Signal handlers for POE::Component::*
by nicholasrperez (Monk) on Sep 25, 2005 at 04:49 UTC | |
by pope (Friar) on Sep 26, 2005 at 07:30 UTC | |
Re: Signal handlers for POE::Component::*
by Ultra (Hermit) on Sep 25, 2005 at 15:37 UTC | |
Re: Signal handlers for POE::Component::*
by eXile (Priest) on Sep 25, 2005 at 15:14 UTC |