Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Listing installed Perl Modules and Versions

Status
Not open for further replies.

erulia

IS-IT--Management
Jan 29, 2003
20
US
I would like to create a program that would find all the modules installed on a server and list the names and the versions of these modules. Any tips as to how to get the version from a module automatically would be helpful and appreciated. Also, if anyone knows of a program that does this already, please let me know! Thanks! Unix Sys Admin
 
One already exists
Code:
perldoc perllocal
will do this for you.

jaa
 
Actually, I found a much more complicated, but much more thorough, way to do this. I go through "@INC" and search for files ending in .pm or .pl that have the "package" line in them, and then try to run $package_name::VERSION. If that doesn't work, I search for a "\$.*VERSION \=" line in the file and try to find a valid version number string in the line. If anyone wants my code for this, let me know. I'll probably post it on my web-page soon. Thanks for the pointers! Unix Sys Admin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top