On Tue, Feb 1, 2011 at 5:39 PM, Eric Brine <ikegami@adaelis.com> wrote:
> Of course, it could stop being invasive completely and track which modules
> it attempted to load in a hash instead of setting $VERSION or *VERSION. If
> memory usage is a concern, it could use the hash only when *Module::VERSION
> and $INC{'Module.pm'} don't exist.
I finally did the close read of the base.pm source that I should have
done originally and my reaction is "OMFG!". Fiddling with $VERSION is
an absurd way to flag that a module has been loaded. Even for inline
packages, it would seem much better to put an artificial entry into
%INC, as that would actually shortcut any subsequent calls to
require() also.
I take back my prior suggestion that a future version of base.pm set
$VERSION to 0. It should not set $VERSION at all and should use an
alternative method to flag what it has loaded (or pretended to load).
I would like to see the existing behavior deprecated for 5.14 and this
fixed in 5.15.
-- David
Thread Previous
|
Thread Next