File: depchecks

package info (click to toggle)
olive 1.3-4
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 316 kB
  • ctags: 79
  • sloc: perl: 2,219; makefile: 35
file content (28 lines) | stat: -rw-r--r-- 542 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
@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;
}