in reply to How do I know if a package is on my server?
G'day gsd4me,
You seem to have answers to your questions. I might just also point you to corelist, which is a front-end utility to Module::CoreList (as discussed by ++shmem).
Although you only asked about modules on different servers, there's also the issue of modules used by different versions of Perl on the same server. I have ten different versions of Perl installed: I often want to check whether a particular Perl version has a module installed and, if so, what that module's version is.
Here's how I've set things up to handle this. My default shell is bash. My functions, which I source in "$HOME/.bash_profile", are in "$HOME/.bash_functions", which contains this "perlmodver" function:
$ cat ~/.bash_functions ... perlmodver () { for i in "$@"; do eval "echo \`perl -E 'no warnings q{deprecated}; require $i; s +ay qq{$i }, \$$i::VERSION'\`" done } ...
Example usage:
$ perlmodver strict DBI Bogus strict 1.11 DBI 1.636 Can't locate Bogus.pm in @INC ...
Depending on your setup, that may work as is; may require minor modification; or might need a major rewrite.
I use it often enough that it's a useful function to have in my toolbox. If this is something you'll use rarely, one of the command line options (already shown) may be a better choice.
— Ken
|
|---|