Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^8: $VERSION in module files

by haukex (Archbishop)
on Mar 27, 2020 at 11:39 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11114716]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (7)
As of 2024-04-26 08:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found