root/docs/yappo/20080515-yapcasia2008/with_hintbits.pm
| Revision 11698, 222 bytes (checked in by yappo, 8 months ago) |
|---|
| Line | |
|---|---|
| 1 | package with_hintbits; |
| 2 | use strict; |
| 3 | use warnings; |
| 4 | my $hint_bits = 0x20000; # HINT_LOCALIZE_HH |
| 5 | sub import { $^H |= $hint_bits; |
| 6 | $^H{$_[0]} = ($_[1] || 'default') } |
| 7 | sub unimport { $^H &= ~ $hint_bits; |
| 8 | delete $^H{(shift)} } |
| 9 | 1; |
Note: See TracBrowser
for help on using the browser.
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)