[Pdx-pm] Austin's $VERSION trick
chromatic at wgz.org
Fri Jul 15 14:26:47 PDT 2005
On Fri, 2005-07-15 at 14:22 -0700, David Wheeler wrote:
> Will this force Perl to re-load Hello::World::Version from disk for
> every module that requires it?
Yes, including cycling through @INC and all. I'm not an optimization
nut, but avoiding unnecessary disk access is good.
> If so, why not add a method to it?
If you set $VERSION, you can use the VERSION method.
> And either way, this won't fix those implementations (such as
> search.cpan.org) that don't evaluate *any* perl code when searching
> for the version number...
True. My distributions include a META.yml file, though. Is this not
More information about the Pdx-pm-list