modulereview
Aristotle
<p>[http://search.cpan.org/perldoc?Carp::Clan|From the docs]:</p>
<blockquote cite="http://search.cpan.org/perldoc?Carp::Clan"><p>In case you just want to ward off all error messages from the module in which you “<code>use Carp::Clan</code>”, 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 “<code>use Carp;</code>” for <tt>;-)</tt>), instead of in your module itself (which is what you can do with a “[doc://die]” or “[doc://warn]” anyway), you do not need to provide a pattern, the module will automatically provide the correct one for you.</p></blockquote>
<p>Before I discovered this module, I would play silly games with <code>local $Carp::CarpLevel = $Carp::CarpLevel + 1</code> sprinkled all over the place. Not only was that annoying, it also hatefully causes [doc://Carp] to emit verbose messages. Now I just <code>use Carp::Clan</code> and things work as I meant them to.</p>
<p>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.</p>
<p>My only question is: why is this not part of the core? Why indeed doesn’t [doc://Carp] itself work that way?</p>
The way it should always have worked