3 BEGIN { print "1..7\n"; }
5 print "not " if exists $^H{foo};
6 print "ok 1 - \$^H{foo} doesn't exist initially\n";
9 # simulate a pragma -- don't forget HINT_LOCALIZE_HH
10 BEGIN { $^H |= 0x00020000; $^H{foo} = "a"; }
12 print "not " if $^H{foo} ne "a";
13 print "ok 2 - \$^H{foo} is now 'a'\n";
16 BEGIN { $^H |= 0x00020000; $^H{foo} = "b"; }
18 print "not " if $^H{foo} ne "b";
19 print "ok 3 - \$^H{foo} is now 'b'\n";
23 print "not " if $^H{foo} ne "a";
24 print "ok 4 - \$H^{foo} restored to 'a'\n";
27 print "not " if exists $^H{foo};
28 print "ok 6 - \$^H{foo} doesn't exist when compilation complete\n";
30 print "not " if exists $^H{foo};
31 print "ok 7 - \$^H{foo} doesn't exist at runtime\n";
34 print "not " if exists $^H{foo};
35 print "ok 5 - \$^H{foo} doesn't exist while finishing compilation\n";