Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Color die and warn messages

by Anonymous Monk
on Aug 01, 2025 at 07:20 UTC ( [id://11165911]=note: print w/replies, xml ) Need Help??


in reply to Color die and warn messages

Doesn't work with Carp. croak calls CORE::die internally so the coloring would need to be done in the die handler, and carp is colored red even though internally it doesn't call CORE::warn, but somehow the CORE::GLOBAL::warn override is bypassed.

Replies are listed 'Best First'.
Re^2: Color die and warn messages
by sleet (Pilgrim) on Sep 04, 2025 at 07:01 UTC
    Carp overrides the die handler so that won't work. What about using a tied handle to STDERR: Perl Programming 4.4. Tying Filehandles. But I don't think it would be possible to distinguish fatal messages.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (2)
As of 2026-03-07 21:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.