# -*- cperl -*- =head1 Perl Hash PMC =head2 Creation As with other PMC's, create the hash with new P0, .PerlHash =head2 Storing Elements To store elements on the hash use set P0["key"], "value" Note that you can use registers in the same way: new P0, .PerlHash set S0, "one" set S1, "two" set P0[S0], 1 # $P0{one} = 1 set P0[S1], 2 # $P0{two} = 2 To get the element use it in the opposite way: set I1, P0["one"] # $I1 = $P0{one} Notice that hashes are polymorphic on the value it holds. =head2 Size of the Hash To get the number of keys (size of the hash) use set I0, P0 where C is the Perl Hash PMC and C the register where to store the hash size. =head2 TODO - Getting values from undefined keys - Clone - Compound keys - PerlHash as a Boolean - defined and exists and delete =cut __END__