本来考虑卸载perl模块可以用cpan工具的,但是经过网上找了半天,最后从一篇外国文章
http://stackoverflow.com/questions/7777252/uninstall-all-perl-modules-installed-by-cpan
看完以后得出来,其实cpan就是个管安装不管卸载的工具,所以要删除perl的模块,还需要别的方式,然后从上面的这篇帖子里面看到,其实可以通过一个工具
https://metacpan.org/module/App::pmuninstall
这个工具的安装方式可以参考下面的
This is Perl module App::pmuninstall.
INSTALLATION
App::pmuninstall installation is straightforward. If your CPAN shell is set up,
you should just be able to do
% cpan App::pmuninstall
Download it, unpack it, then build it as per the usual:
% perl Makefile.PL
% make && make test
Then install it:
% make install
DOCUMENTATION
App::pmuninstall documentation is available as in POD. So you can do:
% perldoc App::pmuninstall
to read the documentation online with your favorite pager
其实说白了最简单的就是直接通过cpan
cpan App::pmuninstall
然后就是装完以后利用
pm-uninstall 模块
不过有些模块通过这种方式还删除不了,对这种模块可以通过下面的方式,也是从网上找到的
perl -e 'print join "\n",@INC'
会print出所有模块和库的安装目录,到这些目录下找到对应的pm删除掉就可以了。