Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

Mar 012010

How to remove install CPAN modules?


1. Copy the script below, e.g.

#!/usr/bin/perl -w 

use ExtUtils::Packlist; 
use ExtUtils::Installed; 

$ARGV[0] or die "Usage: $0 Module::Name\n"; 

my $module = $ARGV[0]; 

my $inst = ExtUtils::Installed->new(); 

foreach my $item (sort($inst->files($module))) { 
    print "Removing $item\n"; 
    unlink $item; 

my $packfile = $inst->packlist($module)->packlist_file(); 
print "Removing $packfile\n"; 
unlink $packfile; 

2. Execute the script to remove module, e.g. MongoDB

# perl MondoDB

 Leave a Reply



You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>