http://qs321.pair.com?node_id=11107243


in reply to Error Reporting from Module

It's probably all wrong and may not be exactly what you want, but having wanted something similar, I discovered this (Google _is_ your friend) ...

use warnings FATAL => 'all';

Just my 10 penn'orth...

A user level that continues to overstate my experience :-))

Replies are listed 'Best First'.
Re^2: Error Reporting from Module
by haukex (Archbishop) on Oct 09, 2019 at 18:31 UTC

    warnings' FATAL has lexical scope, so unless the module provides a custom sub import that allows the person useing the module to turn them on, the user of the module can't do so. And they also don't fatalize warn statements.

    $ perl -Mstrict -Mwarnings=FATAL,all -le 'warn "Hello";my $x=1+"";prin +t $x' Hello at -e line 1. Argument "" isn't numeric in addition (+) at -e line 1.