Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

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 pause.perl.org. 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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (6)
As of 2020-07-08 13:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?