Perl Modules
I tried to run a program and I get an error about a perl module. What do I do?
There are myriads of perl modules available that do all sorts of tasks from connections to databases to determining the size of a dataset. For example, when running program on Monsoon, you may see the following error:
Can't locate Devel/Size.pm in @INC
(you may need to install the Devel::Size module)
Notice that the error output shows that you may need to install Devel::Size
. This is a perl module which may be installed locally in your account through a program called cpan
. If my account name is ricky
, I can enter cpan at the command prompt and I should see:
[ricky@wind ~ ]$ cpan
Loading internal null logger. Install Log::Log4perl
for logging messages
Terminal does not support AddHistory.
cpan shell -- CPAN exploration and modules
installation (v2.18)
Enter 'h' for help.
cpan[1]>
I am now in the cpan shell and may install perl modules at this point. To do that I will use the install
command to install the module that I am missing:
cpan[1]> install Devel::Size
If everything installs correctly you should see the following when it finishes:
/usr/bin/make install -- OK
And be returned to a cpan prompt. At this point you may enter quit to return back to your normal shell prompt.
If you run into any errors on the cpan install you will need to send an email to ask-arc@nau.edu and please copy and paste the errors into the email. Please include a note as to what perl module you are trying to install.