perl modules install and uninstall and list – using cpan
If you want to install perl module SOAP::Lite using cpan for example, here’s the command line:
perl -MCPAN -e ‘install SOAP::Lite’
To test whether the module has been installed or not, run this:
perl -MSOAP::Lite -e “print \”Module installed.\\n\”;”
Also, what about uninstallation?
Under windows:
if you have the activestate distro, go to shell/command prompt, enter PPM. When PPM opens type
“remove [package name]” this will uninstall that particular package for you. type “help remove” in PPM for more details.
Alternativly if you know what files came with the package, just delete them. Be aware that some modules will rely on other modules been installed so make sure there are no dependencies before you remove delete packages.
Under Linux:
/usr/local/lib/perl5/site_perl/5.8.X/Module/Module.pm
OR
/usr/local/lib/perl5/site_perl/5.8.X/Module.pm
depending on the module. (the path might be different on your system, check: perl -e ‘print join(“\n”, @INC);’ )
Also see:
http://www.cpan.org/misc/cpan-faq.html
Generally there is little reason to remove a module, probably why CPAN doesn’t provide this function.
