Jerry D. Hedden [Mon, 6 Nov 2006 08:57:04 +0000 (00:57 -0800)]
From: "Jerry D. Hedden" <jdhedden@yahoo.com>
Message-ID: <
20061106165704.939.qmail@web30214.mail.mud.yahoo.com>
p4raw-id: //depot/perl@29224
package Data::Dumper;
-$VERSION = '2.121_10';
+$VERSION = '2.121_11';
#$| = 1;
$name = "\$" . $s->{varname} . $i;
}
+ # Ensure hash iterator is reset
+ if (ref($val) eq 'HASH') {
+ keys(%$val);
+ }
+
my $valstr;
{
local($s->{apad}) = $s->{apad};
}
use strict;
-use Test::More tests => 2;
+use Test::More tests => 3;
use Data::Dumper;
{
foo({});
ok(1, "[perl #38612]"); # Still no core dump? We are fine.
+{
+ my %h = (1,2,3,4);
+ each %h;
+
+ my $d = Data::Dumper->new([\%h]);
+ $d->Useqq(1);
+ my $txt = $d->Dump();
+ my $VAR1;
+ eval $txt;
+ is_deeply($VAR1, \%h, '[perl #40668] Reset hash iterator');
+}