Remove utility script replaced by a test case
[koha.git] / misc / perlmodule_rm.pl
1 #!/usr/bin/perl -w
2 # Remove a perl module
3 use ExtUtils::Packlist;
4 use ExtUtils::Installed;
5
6 $ARGV[0] or die "Usage: $0 Module::Name\n";
7
8 my $mod = $ARGV[0];
9
10 my $inst = ExtUtils::Installed->new();
11
12 foreach my $item (sort($inst->files($mod))) {
13     print "removing $item\n";
14     unlink $item;
15 }
16
17 my $packfile = $inst->packlist($mod)->packlist_file();
18 print "removing $packfile\n";
19 unlink $packfile;