Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Error Reporting from Module

by Bloodnok (Vicar)
on Oct 09, 2019 at 12:43 UTC ( #11107243=note: print w/replies, xml ) Need Help??


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 (Chancellor) 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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://11107243]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (7)
As of 2020-06-05 19:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you really want to know if there is extraterrestrial life?



    Results (40 votes). Check out past polls.

    Notices?