How to Check if a Perl Module is Installed
Sometimes a Perl application (like FileChucker) will display an error saying that a particular Perl module is not installed on your server — but your hosting company insists that that module is installed. So who's right? Usually, it's the Perl application who's right, and the hosting company who's wrong. That's because the Perl application isn't simply making stuff up; it's reporting a missing-module error because the server itself said that the module is missing.
Fortunately, it's easy to prove whether a module is really installed, using the small test script below:
- Download the file checkmodule.txt to your computer, and edit the "eval" line, replacing "Time::HiRes" with the name of the particular Perl module that you want to check. Then rename the file from checkmodule.txt to checkmodule.cgi.
- Upload the checkmodule.cgi file to your server's cgi-bin directory, then chmod the checkmodule.cgi file (that is, set its permissions) to world-executable, which is a+rx or 0755.
- In your browser, visit www.yoursite.com/cgi-bin/checkmodule.cgi and you will see one of two messages: either a "Module loaded successfully" message, or an "Error loading module" message, with details about the error. (If you get an Internal Server Error, that probably means that you didn't install the checkmodule.cgi script quite right -- see this page for help.)
If the output from this test script contradicts what your hosting company is telling you, there are a few common explanations: they might actually have two different Perl installations on the server, with the module installed in one of them, but not in the other; or perhaps they've simply "installed" the module into the wrong location altogether, perhaps by simply copying it into a folder somewhere, instead of using CPAN or the server's package manager to install it properly. But in most cases, if you point them to the test script, and show them that the code is really just simply asking the server "is this module installed?" and the server is saying "no", then most reasonable hosting companies will be willing to investigate and fix the problem at that point.
If there's anything we can do to help, contact us and send the full address to the checkmodule.cgi file on your server.