Dave Mitchell <[EMAIL PROTECTED]> wrote:
:On Sun, Jun 26, 2005 at 03:16:37PM +0200, Tels wrote:
:> * no matter how you measure it, memory consumption goes down 
:
:Only if the whole code body manages to avoid including Carp.pm. As soon as
:any module anywhere manages to include it, even indirectly (quite likely),
:its a net loss since as well as Carp.pm using memory, you have a bunch of
:extra wrapper functions in each of the modules that have been 'improved',
:all using memory too.

I had a round of this not so long ago on the work application: it is much
easier to get away with locally modifying CPAN modules to avoid such things
than to modify the ones bundled with perl, which are likely to be depended
on by far more things.

Carp usually gets invoked for two reasons: to report a fatal error
(in which case if that's the only use, that's soon enough to be loading
it), and to lie about where an error/warning was found (which I'd almost
always rather it didn't do). I find it great to get a stack trace for
the occasional hard debugging problem, but I'd love to see an end to
the habit of loading it unnecessarily, and I think the core is the only
possible place to start improving that.

(I hate Exporter too, but that's a rant for another day.)

Hugo

Reply via email to