Check whether a Perl module is installed
August 16th, 2005
To check whether a Perl module is installed, use the command:
perl -M<module>
For example:
perl -MCGI
or:
perl -M<module>::<module>::<module>
For example:
perl -MIO::Socket::UNIX
If perl returns a scree of stuff beginning "Can't locate...", then the module isn't installed.
If all you get is a new line, the module is installed - in which case press Ctrl+D to get back to the command prompt.
Potentially similar posts
- Rails Chronicles – Part 2 – July 2011
- Adding your choice of text editor to Flare’s Open With menu – December 2010
- Deleting those pesky lines in Microsoft Word – August 2010
- Perl basics for beginners (on Windows) – August 2010
- Gotchas with running a Perl script as a cron job – August 2010