projects
/
kivitendo-erp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0eb1af1
)
Das Modul "Data::Dumper" hat die Eigenheit, dass es den Iterator von gedumpten Hashes...
author
Moritz Bunkus
<m.bunkus@linet-services.de>
Wed, 19 Sep 2007 14:20:37 +0000
(14:20 +0000)
committer
Moritz Bunkus
<m.bunkus@linet-services.de>
Wed, 19 Sep 2007 14:20:37 +0000
(14:20 +0000)
SL/LXDebug.pm
patch
|
blob
|
history
diff --git
a/SL/LXDebug.pm
b/SL/LXDebug.pm
index
6a8ca5a
..
185297b
100644
(file)
--- a/
SL/LXDebug.pm
+++ b/
SL/LXDebug.pm
@@
-131,6
+131,14
@@
sub dump {
my $dumper = Data::Dumper->new([$variable]);
$dumper->Sortkeys(1);
$self->message($level, "dumping ${name}:\n" . $dumper->Dump());
+
+ # Data::Dumper does not reset the iterator belonging to this hash
+ # if 'Sortkeys' is true. Therefore clear the iterator manually.
+ # See "perldoc -f each".
+ if ($variable && ('HASH' eq ref $variable)) {
+ keys %{ $variable };
+ }
+
} else {
$self->message($level,
"dumping ${name}: Data::Dumper not available; "