| CPAN Ratings (Gamma) Carp-Always reviews | |
| Home | Search | About | Login |
RSS | Module Info | Add a review of Carp-Always
6 out of 7 found this review helpful:
I love this and use it lots. Being able to decide whether I want stack traces on exceptions on a per-script-invocation basis is much more useful than having to decide whether to produce a stack trace on a per-exception-site basis. It’s excellent for printf debugging people like me: instead of having to meddle with the code, just rerun it under Carp::Always and you get a stack trace. For many simple bugs, this already provides enough information to find and fix them.
Four thumbs up!
PS.: Please disregard Robert Rothenberg’s review; he does not appear to have understood the docs. The difference between loading Carp with the `verbose` import option and Carp::Always is that Carp::Always will generate stack traces from plain `die`s and `warn`s, whereas the `verbose` import option to Carp only enables them for `croak`s and `carp`s. The fact that Carp does not need to change die/warn handlers is therefore not an advantage, but a missing feature – nor is it usually relevant, because Carp::Always is intended for loading from outside the script (via PERL5LIB or perl’s -M switch), not as part of the regular operation of code. (It does mean that sometimes Carp::Always won’t work as advertised, but with the means provided by Perl, this cannot be helped.)
Aristotle Pagaltzis - 2008-02-16 07:10:23
Was this review helpful to you?
Yes
No
This module hasn't really explained why it is better than carp: it traps the DIE and WARN handlers so that the carp "longmess" stack traces are always used. That should be made clearer. Which is nice, but...
The docs state that the current version doesn't play well with other modules that change the die/warn handlers. This is something that can be fixed easily. (It's done in Win32::EventLog::Carp -- which I wrote -- for instance.)
I'm not sure that I like warnings to always be verbose, though.
Robert Rothenberg - 2008-02-16 06:27:46
Was this review helpful to you?
Yes
No
Modules like this deserve to be more well-known and should perhaps included in core Perl (or even become a command-line switch). I'm never comfortable with Carp and all the "complexity" of using it. What I wanted is simple, when debugging I want all die()'s (and perhaps warn() too, but much less often) to print a stack trace.
Call me inflicted with Ruby- or Python-envy, but it's been so ridiculous wanting to print out stack traces in Perl. I don't want to have to change/rewrite all my die()'s to croak() or confess()! And what about library codes which use die()?
Thank God somebody wrote Carp::Always.
David Garamond - 2008-02-15 18:41:17
Was this review helpful to you?
Yes
No
A brilliant module, handling a common debugging trick with perfect simplicity. I'd almost like to see this incorporated into Carp in the core.
Andy Lester - 2007-04-30 19:49:33
Was this review helpful to you?
Yes
No
|
Perl.org sites
: bugs
| dev
| history
| jobs
| learn
| lists
| use
Site Information and Contacts |
|