Perl: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
This is a Guide to using Perl, and installing and fixing modules. | === This is a Guide to using Perl, and installing and fixing modules. === | ||
One of the cpan mirrors that can be used for reference on modules names and requirements. | One of the cpan mirrors that can be used for reference on modules names and requirements. | ||
http://www.cpan.org/ | http://www.cpan.org/ | ||
== Installation commands == | |||
You can install a module with the following command. | You can install a module with the following command. | ||
Line 16: | Line 16: | ||
In the event that a forced installation does not work, take the above command perl -V and look for what you are trying to install and remove it manually. | In the event that a forced installation does not work, take the above command perl -V and look for what you are trying to install and remove it manually. | ||
== General PERL tactics == | |||
To update all perl modules use this script. | |||
/scripts/checkperlmodules | |||
To list all Perl modules and put them into a file for easy searching. | |||
perl -MFile::Find=find -MFile::Spec::Functions -Tlwe 'find { wanted => sub { print canonpath $_ if /\.pm\z/ }, no_chdir => 1 }, @INC' > Perlmodules.txt | |||
Then if you wanted to find the imagemagick perl module do the following. | |||
cat Perlmodules.txt |grep -i imagemagick |
Revision as of 09:46, 11 December 2010
This is a Guide to using Perl, and installing and fixing modules.
One of the cpan mirrors that can be used for reference on modules names and requirements.
http://www.cpan.org/
Installation commands
You can install a module with the following command.
cpan -i
You can force an installation of a module with the following command.
cpan -fi
Will show you the contents of the @INC, Which is essentially the path's that the installer is going to pull from and look in.
perl -V
In the event that a forced installation does not work, take the above command perl -V and look for what you are trying to install and remove it manually.
General PERL tactics
To update all perl modules use this script.
/scripts/checkperlmodules
To list all Perl modules and put them into a file for easy searching.
perl -MFile::Find=find -MFile::Spec::Functions -Tlwe 'find { wanted => sub { print canonpath $_ if /\.pm\z/ }, no_chdir => 1 }, @INC' > Perlmodules.txt
Then if you wanted to find the imagemagick perl module do the following.
cat Perlmodules.txt |grep -i imagemagick