We have an old .pm file that was written at least four years ago, and quite possibly much longer. I want to install it locally. I do not have a .gz file for it, and, obviously, it is not available on cpan. Can I install it? How?

Assuming that the file is pure perl code and that it does not use any modules that are not already installed, you have several choices. The best one depends on what you need it for. Is it needed for only one application? Only your own applications? All users of the system? If so, does it have documentation which must be integrated with perl's documentation system?

If it does depend on other modules, you will have to install them (and everything that they depend on). If it (or any of the modules that it requires) contains any code other than perl (usually C) you almost certainly have to find the build file and learn to use it. If you cannot find it, I cannot help you;

We have a venerable old system on the server that is not working right in a particular new case. I want to debug it in Padre. Until I find out otherwise, I am going to assume that the modules are already installed, or that I will get error messages telling me which ones are missing. So if I just knew the procedure for installing a .pm file (in the simplest case), then I could proceed from there.

Although the system does use C, I'm currently willing to assume that this .pm does not call it.

At least while you are debugging, you should "install" questionable modules in a private library. Create a directory (You might as well call it 'lib') in any convenient place. Create an environmental variable "PERL5LIB". Set its value to the full path of your lib. Copy your .pm file into your lib directory. When you use that module, you will get this copy even if it conflicts with another with the same name. No one else will be affected at all.

OK, I skipped one step because I have to remind you of how perl searches for modules. By convention, modules have a double name (e.g. IO::File). Perl changes the '::' to '//' and appends '.pm' to form the file name. The result is that perl searches for a file called File.pm in a subdirectory /IO of any module library.

My directions above work fine if the module name (Refer to the package statement near the beginning of the module) does not have the colons. If it does, you have to create the subdirectory of lib and copy your file into the subdirectory rather than directly into lib.

After you have completed your debugging and identified the modules that you need, You will have to move them to a more permanent home. Lets worry about that latter. With a little luck, you won't need any. Good Luck, Bill