Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Re^8: $VERSION in module files

by haukex (Bishop)
on Mar 27, 2020 at 11:39 UTC ( #11114716=note: print w/replies, xml ) Need Help??

in reply to Re^7: $VERSION in module files
in thread $VERSION in module files

I take it you mean that they do something like a grep for '\$VERSION\s*=' and then execute that line/statement in isolation?

I just checked, cpanm uses Parse::PMFile, its _parse_version is fairly complex*, and its code apparently borrows from PAUSE::pmfile, the latter of course being the indexer for Then there's Module::Info's version, which borrows its code from ExtUtils::MM_Unix... I suspect there's probably a couple more variations on this kind of code out there.

* Its comments also show some very interesting ways some modules set their versions: my $version = atan2(1,1) * 4; $Acme::Pi::VERSION = substr("$version", 0, 16); :-)

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11114716]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2021-09-24 20:18 GMT
Find Nodes?
    Voting Booth?

    No recent polls found