Lines 1-22
Link Here
|
1 |
#!/usr/bin/perl |
|
|
2 |
|
3 |
# Remove a perl module |
4 |
|
5 |
use Modern::Perl; |
6 |
use ExtUtils::Packlist; |
7 |
use ExtUtils::Installed; |
8 |
|
9 |
$ARGV[0] or die "Usage: $0 Module::Name\n"; |
10 |
|
11 |
my $mod = $ARGV[0]; |
12 |
|
13 |
my $inst = ExtUtils::Installed->new(); |
14 |
|
15 |
foreach my $item (sort($inst->files($mod))) { |
16 |
print "removing $item\n"; |
17 |
unlink $item; |
18 |
} |
19 |
|
20 |
my $packfile = $inst->packlist($mod)->packlist_file(); |
21 |
print "removing $packfile\n"; |
22 |
unlink $packfile; |
23 |
- |