Welcome to the Monastery | |
PerlMonks |
Installed modules and their versionsby cog (Parson) |
on Jan 07, 2005 at 09:18 UTC ( [id://420210]=perlquestion: print w/replies, xml ) | Need Help?? |
cog has asked for the wisdom of the Perl Monks concerning the following question:
A friend of mine asked me for a script that would show the installed modules and their versions. "Easy", I thought.
For the part of showing the installed modules, this would do the trick: #!/usr/bin/perl
print for ( ExtUtils::Installed->new->modules ); As for the part of displaying the versions, it became more tricky... "Why?", many would say? "You simply load the module and print Module->VERSION or something, right?" Wrong... what about modules that do unwanted things on startup? If you still don't know what I'm talking about, take a look at modules such as Acme::Bleach, Acme::emcA and so on... Any ideas?
Back to
Seekers of Perl Wisdom
|
|