From: Rafael Garcia-Suarez Date: Tue, 18 Sep 2007 14:10:34 +0000 (+0000) Subject: Prevent the pragmas from ${^OPEN} propagated to %^H from deparsing. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7fa653d884dcfb46cd756ee6975e6ee5b536f7ec;p=p5sagit%2Fp5-mst-13.2.git Prevent the pragmas from ${^OPEN} propagated to %^H from deparsing. This stops test failures when perl is run with -C under utf-8 locales. However this is only a partial solution, since it will prevent the open pragma from being properly deparsed. Probably ${^OPEN} should be handled separately. p4raw-id: //depot/perl@31894 --- diff --git a/ext/B/B/Deparse.pm b/ext/B/B/Deparse.pm index 6cb6e4a..16c5983 100644 --- a/ext/B/B/Deparse.pm +++ b/ext/B/B/Deparse.pm @@ -1453,11 +1453,13 @@ sub declare_hinthash { my ($from, $to, $indent) = @_; my @decls; for my $key (keys %$to) { + next if $key =~ /^open[<>]$/; if (!defined $from->{$key} or $from->{$key} ne $to->{$key}) { push @decls, qq(\$^H{'$key'} = q($to->{$key});); } } for my $key (keys %$from) { + next if $key =~ /^open[<>]$/; if (!exists $to->{$key}) { push @decls, qq(delete \$^H{'$key'};); }