develooper Front page | perl.perl5.porters | Postings from February 2011

Re: [rt.cpan.org #65284] Module broken with 5.13.x development perl versions

Thread Previous | Thread Next
From:
David Golden
Date:
February 1, 2011 15:26
Subject:
Re: [rt.cpan.org #65284] Module broken with 5.13.x development perl versions
Message ID:
AANLkTikzb+duQWs75rBJAzt1xeecrEDD9=cGO53qJDca@mail.gmail.com
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


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About