I did some search and found something that may help me. But I have some questions about them.
Method I: make uninstall
So I did an experiment to try uninstall a module called
(Note: In the example below, the linux prompt is '
62 => ')
[tt]
62 => make uninstall
=============================================
Uninstall is unsafe and deprecated, the uninstallation was not performed.
We will show what would have been done.
unlink /usr/local/man/man3/
unlink /usr/local/man/man3/
unlink /usr/local/share/perl/5.10.1/
unlink /usr/local/share/perl/5.10.1/
unlink /usr/local/lib/perl/5.10.1/auto/
Uninstall is unsafe and deprecated, the uninstallation was not performed.
Please check the list above carefully, there may be errors.
Remove the appropriate files manually.
Sorry for the inconvenience.[/tt]
=============================================
It prints out the commands which are handy to run manually. But apparently it does not modify @INC. I guess it should be OK?
Method II: to use pm-uninstall module found at meta::cpan site -
I downloaded the pkg and unpacked it. All files are listed below:
App-pmuninstall-0.30 151 =>
ls -l
total 64
drwxr-xr-x 2 chyan staff 4096 2013-07-23 11:40 bin/
-rw-r--r-- 1 chyan staff 1824 2013-06-03 10:42 Build.PL
-rw-r--r-- 1 chyan staff 3022 2013-06-03 10:42 Changes
-rw-r--r-- 1 chyan staff 293 2013-06-03 10:42 cpanfile
drwxr-xr-x 3 chyan staff 4096 2013-07-23 11:35 lib/
-rw-r--r-- 1 chyan staff 18346 2013-06-03 10:42 LICENSE
-rw-r--r-- 1 chyan staff 179 2013-06-03 10:42 MANIFEST
-rw-r--r-- 1 chyan staff 2080 2013-06-03 10:42 META.json
-rw-r--r-- 1 chyan staff 1111 2013-06-03 10:42 META.yml
-rw-r--r-- 1 chyan staff 25 2013-06-03 10:42 minil.toml
-rw-r--r-- 1 chyan staff 1420 2013-06-03 10:42 README.md
drwxr-xr-x 2 chyan staff 4096 2013-07-23 11:35 t/
drwxr-xr-x 2 chyan staff 4096 2013-07-23 11:35 xt/
I only know one way to install a non-core cpan module by using Makefile.PL:
Step 1: perl Makefile.PL [return]
Step 2: make [return]
Step 3: sudo make install [return]
But this module (pm-uninstall] has a file Build.PL. Could someone kindly show me how to install this module? The README.MD file is merely a cmdline interface help menu.
many thanks.