3657ef0
From 428c3feac1e9c39f966cc66c36cc3881d202177c Mon Sep 17 00:00:00 2001
3657ef0
From: Niko Tyni <ntyni@debian.org>
3657ef0
Date: Sat, 18 May 2013 09:41:47 +0300
3657ef0
Subject: [PATCH] Fix non-deterministic failures on newer perls
3657ef0
3657ef0
The hash randomization changes in the Perl 5.17 series
3657ef0
made perl.req to occasionally fail to report the dependencies.
3657ef0
3657ef0
Improved diagnostics report
3657ef0
3657ef0
 Use of each() on hash after insertion without resetting hash
3657ef0
 iterator results in undefined behavior, Perl interpreter: 0x9e7010 at
3657ef0
 /home/niko/tmp/libb-perlreq-perl-0.82/blib/lib/B/Walker.pm line 122.
3657ef0
3657ef0
so use keys() instead of each(), as suggested by perldiag.pod.
3657ef0
---
3657ef0
 lib/B/Walker.pm |    2 +-
3657ef0
 1 file changed, 1 insertion(+), 1 deletion(-)
3657ef0
3657ef0
diff --git a/lib/B/Walker.pm b/lib/B/Walker.pm
3657ef0
index b71f204..f626043 100644
3657ef0
--- a/lib/B/Walker.pm
3657ef0
+++ b/lib/B/Walker.pm
3657ef0
@@ -119,7 +119,7 @@ sub walk_gv ($) {
3657ef0
 sub walk_stash ($$);
3657ef0
 sub walk_stash ($$) { # similar to B::walksymtable
3657ef0
 	my ($symref, $prefix) = @_;
3657ef0
-	while (my ($sym) = each %$symref) {
3657ef0
+	for my $sym (keys %$symref) {
3657ef0
 		no strict 'refs';
3657ef0
 		my $fullname = "*main::". $prefix . $sym;
3657ef0
 		if ($sym =~ /::\z/) {
3657ef0
-- 
3657ef0
1.7.10.4
3657ef0