in reply to Re^3: "require Carp" may be hazardous to your code (assume)
in thread "require Carp" may be hazardous to your code
Note that I kick quite a kick out of the last half of that statement. I'm sure the very first thing that require does is exactly that anyway, so I'd never add such trivial code in an obvious attempt at micro-optimization.
Did you read the comment next to "require Carp::Heavy unless $INC{"Carp/Heavy.pm"};" in the source? It's not an optimization. It's done that way so the module runs when Safe disallows require.
Update:
I don't recall you having posted data to support your claim either.
( On average, it takes me 4.24 ns to load Carp. Oops, Time::HiRes loads Carp. New benchmarks in progress. )
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: "require Carp" may be hazardous to your code (assume)
by tye (Sage) on Dec 05, 2006 at 20:02 UTC | |
by ikegami (Patriarch) on Dec 05, 2006 at 21:17 UTC | |
|
Re^5: "require Carp" may be hazardous to your code (assume)
by grinder (Bishop) on Dec 05, 2006 at 20:48 UTC |