use CPAN;

for $mod (qw(Hash::Merge Storable Data::Dumper Number::Format Carp IO::Handle Term::ReadLine::Perl Term::ReadKey 
		Marpa::R2 Spreadsheet::Read Spreadsheet::ReadSXC Text::CSV_XS  File::Util::Tempdir )) { 
					
	 CPAN::Shell->install($mod);
}
foreach (@ARGV) {
	if ( $_ eq "--sql") {
		for $mod (qw(DBI DBD::mysql )) { 
			 CPAN::Shell->install($mod);
		}
	}
	if ( $_ eq "--excel") {
		for $mod (qw(Spreadsheet::ParseExcel Spreadsheet::ParseXLSX)) { 
			 CPAN::Shell->install($mod);
		}
	}
#	if ( $_ eq "--csv") {
#		for $mod (qw(Text::CSV_XS)) { 
#			 CPAN::Shell->install($mod);
#		}
#	}
	if ( $_ eq "--sparql") {
		for $mod (qw(JSON::MaybeXS JSON::Any  RDF::Query::Client)) { 
			 CPAN::Shell->install($mod);
		}
	}
	if ( $_ eq "--parallel") {
		for $mod (qw(Parallel::Iterator)) { 
			 CPAN::Shell->install($mod);
		}
	}
	if ( $_ eq "--allDb") {
		for $mod (qw(DBI DBD::mysql JSON::MaybeXS JSON::Any RDF::Query::Client Spreadsheet::ParseExcel Spreadsheet::ParseXLSX Text::CSV_XS)) { 
			 CPAN::Shell->install($mod);
		}
	}
	if ($_ eq "-x" || $_ eq "--mpmasdist") {
		for $mod (qw(Math::CDF Math::Random::MT::Auto  ExtUtils::MakeMaker ExtUtils::F77 PGPLOT PDL PDL::Graphics::PGPLOT PDL::Slatec Algorithm:Munkres)) { 
			 CPAN::Shell->install($mod);
		}
	} 
}
