chromatic <[EMAIL PROTECTED]> wrote:
:On Thu, 2004-09-30 at 06:54, Rafael Garcia-Suarez wrote:
:
:> Tels wrote:
:
:> > I would also like to patch the doc of Carp to promote the
:> >
:> > require Carp;
:> > Carp::croak ("...");
:> >
:> > syntax over the use one. Should I send a patch for this?
:>
:> Why not -- once this issue is sorted out.
:
:Wasn't the point of Carp::Heavy to make this unnecessary? If that's the
:case, fixing Carp would be a lot easier than changing "use Carp;" to
:"require Carp;" everywhere.
"Necessary" or not is a sliding scale - I recently spent some time trying
to reduce resource cost of a suite of CGI applications, and profiling
showed a lot of time lost loading useless modules such as Carp, Exporter
etc.
I was able to cut out some of the waste by hacking things at installation
time (eg my installer replaces 'use strict' with the $^H bit-twiddling
it stands in for) but most of it is forced on me by standard modules.
Come perl6, I'd care less, since I'd expect the cost to be paid once at
compile time and thereafter only when the code changes. In the meantime,
I welcome anything that defers resource use to when it is actually
needed as long as it doesn't significantly reduce clarity of the code;
preferring 'require' to 'use' when handling exceptions is something I'd
see as a no-brainer.
Hugo