Archive for January 23rd, 2007

 

Borrar modulos de Perl instalados con CPAN

Jan 23, 2007 in perl

http://www.cpan.org/misc/cpan-faq.html#How_delete_Perl_modules

#!/usr/local/bin/perl -w

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

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

my $mod = $ARGV[0];

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

foreach my $item (sort($inst->files($mod))) {
print “removing $item\n”;
unlink $item;
}

my $packfile = $inst->packlist($mod)->packlist_file();
print “removing $packfile\n”;
unlink $packfile;