Item Description: The way it should always have worked
Review Synopsis:
In case you just want to ward off all error messages from the module in which you “use Carp::Clan”, i.e., if you want to make all error messages or warnings to appear to originate from where your module was called (this is what you usually used to “use Carp;” for ;-)), instead of in your module itself (which is what you can do with a “die” or “warn” anyway), you do not need to provide a pattern, the module will automatically provide the correct one for you.
Before I discovered this module, I would play silly games with local $Carp::CarpLevel = $Carp::CarpLevel + 1 sprinkled all over the place. Not only was that annoying, it also hatefully causes Carp to emit verbose messages. Now I just use Carp::Clan and things work as I meant them to.
Of course, that’s not the module’s only use – but that alone makes the module worthwhile to use everywhere, even if you don’t have a “clan” of modules.
My only question is: why is this not part of the core? Why indeed doesn’t Carp itself work that way?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Carp::Clan
by salva (Canon) on Jun 08, 2006 at 13:58 UTC | |
by Aristotle (Chancellor) on Jun 08, 2006 at 20:58 UTC | |
by salva (Canon) on Jun 09, 2006 at 06:51 UTC | |
Re: Carp::Clan
by ambrus (Abbot) on Jun 08, 2006 at 18:58 UTC | |
by Aristotle (Chancellor) on Jun 08, 2006 at 20:59 UTC | |
Re: Carp::Clan
by diotalevi (Canon) on Jun 08, 2006 at 17:19 UTC | |
by Aristotle (Chancellor) on Jun 08, 2006 at 20:50 UTC | |
by ikegami (Patriarch) on Jun 08, 2006 at 21:37 UTC |