3 |
# $Id$ |
# $Id$ |
4 |
# |
# |
5 |
# $Log$ |
# $Log$ |
6 |
|
# Revision 1.3 2002/12/01 22:12:25 joko |
7 |
|
# + changed status-flags: 0 => 'notok' 1 => 'ok' |
8 |
|
# |
9 |
|
# Revision 1.2 2002/10/25 11:38:50 joko |
10 |
|
# + sub checkCommonDeps |
11 |
|
# + sub checkDeps_orig |
12 |
|
# + refactored sub checkDeps |
13 |
|
# |
14 |
# Revision 1.1 2002/07/27 00:28:36 cvsjoko |
# Revision 1.1 2002/07/27 00:28:36 cvsjoko |
15 |
# + new |
# + new |
16 |
# |
# |
70 |
} |
} |
71 |
|
|
72 |
|
|
73 |
sub checkDeps { |
sub checkCommonDeps { |
74 |
|
checkDeps_orig(\@modules); |
75 |
|
} |
76 |
|
|
77 |
|
sub checkDeps_orig { |
78 |
|
my $modules = shift; |
79 |
|
my @modules = @{$modules}; |
80 |
map { |
map { |
81 |
#print $_, "\n"; |
#print $_, "\n"; |
82 |
print "testing for \"$_\" ..."; |
print "testing for \"$_\" ..."; |
97 |
} @modules; |
} @modules; |
98 |
} |
} |
99 |
|
|
100 |
|
sub checkDeps { |
101 |
|
my $modules = shift; |
102 |
|
my @modules = @{$modules}; |
103 |
|
my $result; |
104 |
|
map { |
105 |
|
my $evalcmd = "use $_;"; |
106 |
|
eval($evalcmd); |
107 |
|
if ($@) { |
108 |
|
$result->{$_} = 'notok'; |
109 |
|
} else { |
110 |
|
$result->{$_} = 'ok'; |
111 |
|
} |
112 |
|
} @modules; |
113 |
|
return $result; |
114 |
|
} |
115 |
|
|
116 |
1; |
1; |