3 |
# $Id$ |
# $Id$ |
4 |
# |
# |
5 |
# $Log$ |
# $Log$ |
6 |
|
# Revision 1.13 2002/12/23 04:25:13 joko |
7 |
|
# + sub bool2status |
8 |
|
# |
9 |
|
# Revision 1.12 2002/12/22 14:15:02 joko |
10 |
|
# + sub mkObject |
11 |
|
# |
12 |
# Revision 1.11 2002/12/19 16:27:17 joko |
# Revision 1.11 2002/12/19 16:27:17 joko |
13 |
# +- renamed 'cmd' to 'run_cmd' |
# +- renamed 'cmd' to 'run_cmd' |
14 |
# |
# |
68 |
deep_copy |
deep_copy |
69 |
getNewPerlObjectByPkgName |
getNewPerlObjectByPkgName |
70 |
run_cmd run_cmds |
run_cmd run_cmds |
71 |
|
mkObject |
72 |
|
bool2status |
73 |
); |
); |
74 |
|
|
75 |
use Data::Dumper; |
use Data::Dumper; |
246 |
return $pkgname->new($args); |
return $pkgname->new($args); |
247 |
} |
} |
248 |
|
|
249 |
|
sub mkObject { |
250 |
|
my $pkgname = shift; |
251 |
|
#my $args = shift; |
252 |
|
#$logger->debug( __PACKAGE__ . "->getNewPerlObjectByPkgName( pkgname $pkgname args $args )" ); |
253 |
|
my $evstring = "use $pkgname;"; |
254 |
|
eval($evstring); |
255 |
|
#$@ && $logger->error( __PACKAGE__ . ':' . __LINE__ . " Error in eval $evstring: " . $@ ); |
256 |
|
$@ && print( __PACKAGE__ . ':' . __LINE__ . " Error in eval \"$evstring\": " . $@ ); |
257 |
|
return $pkgname->new(@_); |
258 |
|
} |
259 |
|
|
260 |
sub run_cmd { |
sub run_cmd { |
261 |
my $cmd = shift; |
my $cmd = shift; |
262 |
$cmd = 'perl ' . $cmd; |
$cmd = 'perl ' . $cmd; |
274 |
} |
} |
275 |
} |
} |
276 |
|
|
277 |
|
sub bool2status { |
278 |
|
my $bool = shift; |
279 |
|
return ($bool ? 'ok' : 'failed'); |
280 |
|
} |
281 |
|
|
282 |
1; |
1; |