3 |
# $Id$ |
# $Id$ |
4 |
# |
# |
5 |
# $Log$ |
# $Log$ |
6 |
|
# Revision 1.12 2002/12/22 14:15:02 joko |
7 |
|
# + sub mkObject |
8 |
|
# |
9 |
|
# Revision 1.11 2002/12/19 16:27:17 joko |
10 |
|
# +- renamed 'cmd' to 'run_cmd' |
11 |
|
# |
12 |
# Revision 1.10 2002/12/19 01:05:35 joko |
# Revision 1.10 2002/12/19 01:05:35 joko |
13 |
# + sub today |
# + sub today |
14 |
# |
# |
56 |
md5 md5_hex md5_base64 |
md5 md5_hex md5_base64 |
57 |
ParseDate UnixDate |
ParseDate UnixDate |
58 |
strftime |
strftime |
|
stripHtml stripSpaces stripNewLines toReal trim |
|
59 |
croak |
croak |
60 |
|
|
61 |
|
stripHtml stripSpaces stripNewLines toReal trim |
62 |
array_getDifference |
array_getDifference |
63 |
getDirList |
getDirList |
64 |
now |
now today |
65 |
deep_copy |
deep_copy |
66 |
getNewPerlObjectByPkgName |
getNewPerlObjectByPkgName |
67 |
cmd |
run_cmd run_cmds |
68 |
run_cmds |
mkObject |
|
today |
|
69 |
); |
); |
70 |
|
|
71 |
use Data::Dumper; |
use Data::Dumper; |
242 |
return $pkgname->new($args); |
return $pkgname->new($args); |
243 |
} |
} |
244 |
|
|
245 |
sub cmd ($) { |
sub mkObject { |
246 |
|
my $pkgname = shift; |
247 |
|
#my $args = shift; |
248 |
|
#$logger->debug( __PACKAGE__ . "->getNewPerlObjectByPkgName( pkgname $pkgname args $args )" ); |
249 |
|
my $evstring = "use $pkgname;"; |
250 |
|
eval($evstring); |
251 |
|
#$@ && $logger->error( __PACKAGE__ . ':' . __LINE__ . " Error in eval $evstring: " . $@ ); |
252 |
|
$@ && print( __PACKAGE__ . ':' . __LINE__ . " Error in eval \"$evstring\": " . $@ ); |
253 |
|
return $pkgname->new(@_); |
254 |
|
} |
255 |
|
|
256 |
|
sub run_cmd { |
257 |
my $cmd = shift; |
my $cmd = shift; |
258 |
$cmd = 'perl ' . $cmd; |
$cmd = 'perl ' . $cmd; |
259 |
my $sep = "-" x 90; |
my $sep = "-" x 90; |
266 |
|
|
267 |
sub run_cmds { |
sub run_cmds { |
268 |
foreach (@_) { |
foreach (@_) { |
269 |
cmd($_); |
run_cmd($_); |
270 |
} |
} |
271 |
} |
} |
272 |
|
|