Subject: | Tests fail with Perl 5.18 |
As reported in http://bugs.debian.org/708592, the following patch may be added:
The hash randomization changes in the Perl 5.17 series made perl.req to occasionally fail to report the dependencies.
Improved diagnostics report:
Use of each() on hash after insertion without resetting hash
iterator results in undefined behavior, Perl interpreter: 0x9e7010 at
/home/niko/tmp/libb-perlreq-perl-0.82/blib/lib/B/Walker.pm line 122.
so use keys() instead of each(), as suggested by perldiag.pod.
--- libb-perlreq-perl-0.82.orig/lib/B/Walker.pm
+++ libb-perlreq-perl-0.82/lib/B/Walker.pm
@@ -119,7 +119,7 @@ sub walk_gv ($) {
sub walk_stash ($$);
sub walk_stash ($$) { # similar to B::walksymtable
my ($symref, $prefix) = @_;
- while (my ($sym) = each %$symref) {
+ for my $sym (keys %$symref) {
no strict 'refs';
my $fullname = "*main::". $prefix . $sym;
if ($sym =~ /::\z/) {