Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: carp always showing stacktrace

by LanX (Saint)
on Jul 21, 2020 at 12:37 UTC ( [id://11119594]=note: print w/replies, xml ) Need Help??


in reply to Re: carp always showing stacktrace
in thread carp always showing stacktrace

Thanks for the SO-link ...

I totally agree with you that this naming is unfortunate.

To the point that I can't read my own modules w/o comments.

Now I'm pondering about aliasing them in my own modules, to help me understand my code

expanding the text from SO with potential aliases.

There are 2 sets of yes/no options. The function can be fatal (like die) or nonfatal (like warn). It can report just the line where the function was called, or it can report a full backtrace.

Fatal Backtrace Alias carp N N warn_user ° cluck N Y warn_full croak Y N die_user confess Y Y die_full

FWIW: Renaming subs is easy in Perl.

*warn_user = \&Carp::carp

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery

°) it's not warning the caller

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2024-04-25 07:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found