@deps = @ARGV;

foreach $dep (@deps) { 
    $odep = $dep;
    $dep =~ s|::|/|g;
    $dep .= ".pm"; 
    $i = 0; 
    foreach $path (@INC) { 
        if (-e "$path/$dep") { 
            $i = 1;
            last; 
        }
    }
    unless ($i) {
        $j++;
        
        $baddeps .= "    $odep\n";
    }
}

if ($j) {
    print "Required modules not found:\n";
    print $baddeps;
    print "You can either install them manually or do:\n";
    print "    cpan Bundle::Olive\n";
    print "to slurp them all in at once.\n";
    exit 1;
}
