#!/usr/bin/perl
use File::Path 'rmtree';
require './tomcat-lib.pl';
&ReadParse();
sub uninstall_lib{
my $lib_name = $_[0];
#get extension files
my $lib_list = "$module_config_directory/lib_$lib_name.list";
my %lib_files;
&read_file($lib_list, \%lib_files);
foreach $j (keys %lib_files){
if( -e $lib_files{$j} or -l $lib_files{$j}){
&unlink_file($lib_files{$j});
print "$lib_files{$j}
";
}elsif( -d $lib_files{$j}){
rmtree($lib_files{$j});
}else{
print "Listed jar $j doesn't exist!
";
}
}
&unlink_file($lib_list);
print "