[Xml-compile] Re: Log::Report modes

Karen Etheridge perl at froods.org
Wed Oct 17 22:57:50 GMT 2012


On Thu, Oct 18, 2012 at 12:38:49AM +0200, Mark Overmeer wrote:
> * Karen Etheridge (perl at froods.org) [121017 22:36]:
> > On Wed, Oct 17, 2012 at 11:37:12PM +0200, Mark Overmeer wrote:
> > > > The other way I could work around this would be to set up a __WARN__
> > > > handler, if all emissions from Log::Report are guaranteed to be to stderr.
> > > 
> > > All emissions of Log::Report are to the dispatchers.  If the "Perl"
> > > dispatcher is amongst them, then die's and warns will be activated.
> > > Log::Report's try{} disables the current dispatchers temporarily.
> > > It is *not* the same as Try::Tiny. 
> > 
> > Okay! Then what I probably want then is a way to turn off all dispatchers?
> > I don't see an example in the docs for how to do that.
> 
> Log::Report's try{} turns off all usual dispatchers.  See
> the manual of Log::Report::Dispatcher::Try

I should have included: "...turn off all dispatchers, without interfering
with any existing exception handling that is already in place". :)

I've also discovered that adding a __WARN__ handler to catch the
dispatcher's emissions is also stopping the normal request handling flow -
without a handler, I get something back in $answer; with, I get nothing.
This is very odd.




More information about the Xml-compile mailing list