Lines Matching refs:hash

102   $revmemotable{$wrapper} = "" . $cref; # Turn code ref into hash key
118 } elsif ($cache_opt eq 'HASH') { # user-supplied hash
126 # default is that we make up an in-memory hash
136 # both get merged to the same in-memory hash.
170 # This function tries to load a tied hash class and tie the hash to it.
172 my ($context, $hash, $options) = @_;
192 croak "Memoize: Couldn't load hash tie module `$module': $@; aborting";
194 my $rc = (tie %$hash => $module, @args);
196 croak "Memoize: Couldn't tie hash to `$module': $!; aborting";
211 croak "Tied cache hash for $context-context $funcname does not support flushing";
307 # warn "Untying hash #$i\n";
524 my %hash = @_;
525 $hash{B} ||= 2; # B defaults to 2
526 $hash{C} ||= 7; # C defaults to 7
528 # Do something with $a, %hash
551 my %hash = @_;
552 $hash{B} ||= 2;
553 $hash{C} ||= 7;
555 join(',', $a, map ($_ => $hash{$_}) sort keys %hash);
585 Since hash keys are strings, the default normalizer will not
636 ordinary Perl hash variable. However, you might like to have the
644 cached in one hash, and when your function is called in list context,
645 its value is cached in the other hash. You can control the caching
664 an ordinary Perl hash variable. The hash variable will not persist
669 C<HASH> allows you to specify that a particular hash that you supply
670 will be used as the cache. You can tie this hash beforehand to give
673 A tied hash can have any semantics at all. It is typically tied to an
724 return values should be stored in the same hash that is used for
766 # ... now compute the hash key from the arguments ...
807 Note that if the cache is a tied hash, C<flush_cache> will attempt to
808 invoke the C<CLEAR> method on the hash. If there is no C<CLEAR>
812 (see above) to request that C<Memoize> use a particular hash variable
813 as its cache. Then you can examine or modify the hash at any time in
814 any way you desire. You may flush the cache by using C<%hash = ()>.
911 I pointed out that C<Memoize> uses a hash, and that looking up a
912 number in the hash is necessarily going to take a lot longer than a
922 You can tie the cache tables to any sort of tied hash that you want
942 C<Storable> isn't a tied hash class at all. You can use it to store a
943 hash to disk and retrieve it again, but you can't modify the hash while
946 front-end onto C<Storable>. The hash table is actually kept in