3 |
# $Id$ |
# $Id$ |
4 |
# |
# |
5 |
# $Log$ |
# $Log$ |
6 |
|
# Revision 1.9 2002/12/05 13:54:00 joko |
7 |
|
# + fix: let 'deep_copy' print its message out (instead of die) |
8 |
|
# |
9 |
|
# Revision 1.8 2002/12/01 22:11:35 joko |
10 |
|
# + sub cmd |
11 |
|
# + sub run_cmds |
12 |
|
# |
13 |
# Revision 1.7 2002/11/29 04:44:53 joko |
# Revision 1.7 2002/11/29 04:44:53 joko |
14 |
# - sub array_getRelations |
# - sub array_getRelations |
15 |
# + sub getNewPerlObjectByPkgName |
# + sub getNewPerlObjectByPkgName |
54 |
now |
now |
55 |
deep_copy |
deep_copy |
56 |
getNewPerlObjectByPkgName |
getNewPerlObjectByPkgName |
57 |
|
cmd |
58 |
|
run_cmds |
59 |
); |
); |
60 |
|
|
61 |
use Data::Dumper; |
use Data::Dumper; |
213 |
+{map { $_ => deep_copy($this->{$_}) } keys %$this}; |
+{map { $_ => deep_copy($this->{$_}) } keys %$this}; |
214 |
} elsif (ref $this eq "CODE") { |
} elsif (ref $this eq "CODE") { |
215 |
$this; |
$this; |
216 |
} else { die "what type is $_?" } |
#} else { die "deep_copy asks: what type is $this?" } |
217 |
|
} else { print "deep_copy asks: what type is $this?", "\n"; } |
218 |
} |
} |
219 |
|
|
220 |
sub getNewPerlObjectByPkgName { |
sub getNewPerlObjectByPkgName { |
228 |
return $pkgname->new($args); |
return $pkgname->new($args); |
229 |
} |
} |
230 |
|
|
231 |
|
sub cmd ($) { |
232 |
|
my $cmd = shift; |
233 |
|
$cmd = 'perl ' . $cmd; |
234 |
|
my $sep = "-" x 90; |
235 |
|
print $sep, "\n"; |
236 |
|
print " ", $cmd, "\n"; |
237 |
|
print $sep, "\n"; |
238 |
|
system($cmd); |
239 |
|
print "\n"; |
240 |
|
} |
241 |
|
|
242 |
|
sub run_cmds { |
243 |
|
foreach (@_) { |
244 |
|
cmd($_); |
245 |
|
} |
246 |
|
} |
247 |
|
|
248 |
1; |
1; |