1N/A# Tests the scoping of $^H and %^H 1N/A chdir 't' if -d 't'; 1N/A print "ok 1 - \$^H{foo} doesn't exist initially\n"; 1N/A print "not " if $^H & 0x00020000; 1N/A print "ok 2 - \$^H doesn't contain HINT_LOCALIZE_HH initially\n"; 1N/A # simulate a pragma -- don't forget HINT_LOCALIZE_HH 1N/A print "ok 3 - \$^H{foo} is now 'a'\n"; 1N/A print "ok 4 - \$^H contains HINT_LOCALIZE_HH while compiling\n"; 1N/A print "ok 5 - \$^H{foo} is now 'b'\n"; 1N/A print "ok 6 - \$H^{foo} restored to 'a'\n"; 1N/A # The pragma settings disappear after compilation 1N/A # (test at CHECK-time and at run-time) 1N/A print "ok 9 - \$^H{foo} doesn't exist when compilation complete\n"; 1N/A print "not " if $^H & 0x00020000; 1N/A print "ok 10 - \$^H doesn't contain HINT_LOCALIZE_HH when compilation complete\n"; 1N/A print "ok 11 - \$^H{foo} doesn't exist at runtime\n"; 1N/A print "not " if $^H & 0x00020000; 1N/A print "ok 12 - \$^H doesn't contain HINT_LOCALIZE_HH at run-time\n"; 1N/A # op_entereval should keep the pragmas it was compiled with 1N/A print "ok 13 - \$^H{foo} is 'a' at eval-\"\" time # TODO\n"; 1N/A print "ok 14 - \$^H contains HINT_LOCALIZE_HH at eval\"\"-time\n"; 1N/A print "ok 7 - \$^H{foo} doesn't exist while finishing compilation\n"; 1N/A print "not " if $^H & 0x00020000; 1N/A print "ok 8 - \$^H doesn't contain HINT_LOCALIZE_HH while finishing compilation\n"; 1N/A# bug #27040: hints hash was being double-freed 1N/A prog => '$^H |= 0x20000; eval q{BEGIN { $^H |= 0x20000 }}', 1N/Aprint "ok 15 - double-freeing hints hash\n";