process()
is an eval, but one which expects and handles exceptions
generated by Log::Report. Any messages will be logged as normal in
accordance with the dispatchers, but any fatal exceptions will be caught
and handled gracefully. This allows much simpler error handling, rather
than needing to test for lots of different scenarios.
In a module, it is enough to simply use the error
keyword in the event of a
fatal error.
The return value will be 1 for success or 0 if a fatal exception occurred.
See the DETAILS for an example of how this is expected to be used.
Modules do not need to use this plugin, instead they can use Log::Report
.
All the standard Log::Report functions are available to use. Please see the The Reason for the report for details of when each one should be used.