Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Re: How to lose Carp levels with @CARP_NOT?

by liz (Monsignor)
on Jan 29, 2004 at 16:52 UTC ( #324961=note: print w/replies, xml ) Need Help??


in reply to Re: How to lose Carp levels with @CARP_NOT?
in thread How to lose Carp levels with @CARP_NOT?

The more robust solution is the new internal style. Just stick the line: $Carp::Internal{$_}++ for 'Log::Dispatch::Output', 'Log::Dispatch'; in your module. And now those two packages will be ignored whenever Carp crawls back, looking for where to start reporting the error from.

How will you know whether a Carp.pm supports this? Check if the %Carp::Internal hash exists already? Or is there some version number check that I can use?

Liz

Replies are listed 'Best First'.
Re: Re: Re: How to lose Carp levels with @CARP_NOT?
by tilly (Archbishop) on Jan 29, 2004 at 19:13 UTC
    %Carp::Internal was introduced in Perl 5.8. $Carp::CarpLevel was available before that, but was always a bad idea. If you want, you can read a rant or two on why I dislike it.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://324961]
help
Chatterbox?
[Lady_Aleena]: What?! Can't stat ~/Music: No such file or directory? The ~/ doesn't expand?
[Lady_Aleena]: And the env variable $HOME doesn't work either. !@#$
[shmem]: no, that's a shell feature. Use $ENV{HOME}
[marioroy]: my $ans = qx{ find \$HOME -name "*.pl" -exec ls -l {} \\; };
[marioroy]: must backslash $ inside qx
[Lady_Aleena]: I haven't written perl for a while, I've been trying to do things at the command line. I'm having to relearn a lot.
[marioroy]: LA can you post the qx find again
[Lady_Aleena]: Things I would have written a script for while I was on Windows, I can run simply on the command line.

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (13)
As of 2017-04-23 21:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (432 votes). Check out past polls.