#use strict;
use warnings;
use ExtUtils::Installed;
#
# First, check if all the required modules have been installed in the system
#
BEGIN {
my @import_modules = (
'Cwd',
'File::chdir',
'File::Copy',
'POSIX',
'Tie::File',
'Try::Tiny',
'Data::Dumper',
'File::Basename',
'Bio::SeqIO',
'FindBin',
'File::Remove',
'Capture::Tiny',
'File::Temp',
'File::Spec::Functions',
'Statistics::Multtest',
'File::Path',
'Statistics::Distributions',
'Getopt::Long',
'Statistics::R',
'Math::Round',
'File::Find',
'Bio::DB::Taxonomy',
'Pod::Usage',
);
my ($inst) = ExtUtils::Installed->new();
my (@installed_modules) = $inst->modules();
for ( @import_modules ) {
eval{ $inst->validate($_) };
if($@) {
print qq{\n Module $_ NOT OK!\n };
#exit 1;
} # end 'if'
else { print "\n Module $_ OK!\n";}
} # end 'for'
} # end 'BEGIN' block