Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^2: Error::Simple or eval{} use to capture &Carp::croak

by Anonymous Monk
on Sep 04, 2009 at 02:34 UTC ( [id://793348]=note: print w/replies, xml ) Need Help??


in reply to Re: Error::Simple or eval{} use to capture &Carp::croak
in thread Error::Simple or eval{} use to capture &Carp::croak

I do not want to override die|croak; I want just to be able to do something after they have done their deed, which eval-$@ handles. So could try-catch, but I am unsure about potential problems.
  • Comment on Re^2: Error::Simple or eval{} use to capture &Carp::croak

Replies are listed 'Best First'.
Re^3: Error::Simple or eval{} use to capture &Carp::croak
by SFLEX (Chaplain) on Sep 04, 2009 at 22:47 UTC
    I think the error from croak is sent to warn so maybe you can do something after that error has accrued like this.
    $SIG{__WARN__} = sub { my $wn = shift; handle_this_error() if $wn =~ /The_Error_Your_After/i; warn $wn; };


Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2024-04-19 22:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found