From: Nicholas Clark Date: Tue, 9 Oct 2007 11:57:16 +0000 (+0000) Subject: Don't deparse $^H{v_string}, which is automatically set by the X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=493c23c6567f98df60af89281e4de65bd1060e74;p=p5sagit%2Fp5-mst-13.2.git Don't deparse $^H{v_string}, which is automatically set by the internals. Doing so confuses modules that test the round-tripping of various code. p4raw-id: //depot/perl@32076 --- diff --git a/ext/B/B/Deparse.pm b/ext/B/B/Deparse.pm index b0b3175..77ae15f 100644 --- a/ext/B/B/Deparse.pm +++ b/ext/B/B/Deparse.pm @@ -1451,17 +1451,25 @@ sub declare_hints { return $decls; } +# Internal implementation hints that the core sets automatically, so don't need +# (or want) to be passed back to the user +my %ignored_hints = ( + 'open<' => 1, + 'open>' => 1, + 'v_string' => 1, + ); + sub declare_hinthash { my ($from, $to, $indent) = @_; my @decls; for my $key (keys %$to) { - next if $key =~ /^open[<>]$/; + next if $ignored_hints{$key}; 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[<>]$/; + next if $ignored_hints{$key}; if (!exists $to->{$key}) { push @decls, qq(delete \$^H{'$key'};); }