This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix deparsing of undefined hint hash values
[perl5.git] / dist / B-Deparse / t / deparse.t
index 84b9925..7b11ccf 100644 (file)
@@ -793,3 +793,17 @@ print sort(foo('bar'));
 # substr assignment
 substr(my $a, 0, 0) = (foo(), bar());
 $a++;
+####
+# hint hash
+BEGIN { $^H{'foo'} = undef; }
+{
+ BEGIN { $^H{'bar'} = undef; }
+ {
+  BEGIN { $^H{'baz'} = undef; }
+  {
+   print $_;
+  }
+  print $_;
+ }
+ print $_;
+}