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

Mark Overmeer mark at overmeer.net
Wed Oct 17 23:14:32 GMT 2012


* Karen Etheridge (perl at froods.org) [121017 22:58]:
> > 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". :)

This will certainly work:

   my ($answer, $trace) = try { $call->request(%args) };

> 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.

What is the scope of the change of __WARN__?
  local $SIG{__WARN__} = sub {...};

Log::Report's try{} will catch WARN and DIE and translate those into
real exceptions.  See Log::Report::Die for the translation.  If you
block the info from flowing to the try{}   (the compiled client has
one inside as well), then not all errors will get to the trace object.
-- 
               MarkOv

------------------------------------------------------------------------
       Mark Overmeer MSc                                MARKOV Solutions
       Mark at Overmeer.net                          solutions at overmeer.net
http://Mark.Overmeer.net                   http://solutions.overmeer.net




More information about the Xml-compile mailing list