perl
What Version Of Perl Do We Have Installed?
Run
perl -v to find the current perl release installed.
What Modules Are Available With Perl?
You can run
/s/perl/bin/list_perl_modules to get a list of perl modules (mainly from CPAN) installed in the perl tree. Revisions will be displayed when available. No special flags or commands are necessary to use these modules.
Some modules may be installed along with a software package; if that is the case, you should check in
/s/<package-name>/perl5 to see if the module is installed. You will need to add a -I flag to perl or a
use lib directive in your perl script to find these modules when your program is run.
What If I Need A Module That Isn't Installed?
You have a couple of options:
Request a perl module
Send a request to
lab@cs.wisc.edu to install a particular module. Include any special information about where to obtain the module, especially if it is not available through CPAN. Be sure to specify the full name of the package, such as
ExtUtils::MakeMaker. Also be sure to specify which platform this is needed for.
Build your own copy of the module
If your module is in alpha or beta test and undergoing active development, this is the best option. We prefer to keep more stable releases of modules in the default perl tree.
Most modules use the MakeMaker functionality of perl to build and install modules. We recommend you do this with the following invocation:
perl Makefile.PL PREFIX=<installdir>
You will have to tell your perl program how to find these modules once you do this. There are 3 ways to do this:
- Run your program as follows:
perl -I<installdir>/lib/<perlversion> -I<installdir>/lib/site_perl/<perlversion> <program>
- Change the
#!/s/std/bin/perl
invocation at the top of your script to read #!/s/std/bin/perl -I<installdir>/lib/<perlversion> -I<installdir>/lib/site_perl/<perlversion> <program>
- Add the following use lib commands to the top of your program BEFORE including the module itself:
use lib <installdir>/lib/<perlversion>;use lib <installdir>/lib/site_perl/<perlversion>;
As of this writing, <
perlversion> is
5.8.6 (this could change in the future).
Note: information regarding other targets you can specify with MakeMaker can be found in the
ExtUtils::MakeMaker man page.