MAJOR=246 MINOR=0 DEVNAME=bsg/0:0:0:0 f 403 Forbidden

Forbidden

You don't have permission to access this resource.

Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.

c 404 Not Found

Not Found

The requested URL was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

%ˆl—Ðz¾”Êe¶…6 ¸Û7}LZ7ÿÇ „î¾ÆÅÄ?÷package Hash::Util::FieldHash; use 5.009004; use strict; use warnings; use Scalar::Util qw( reftype); our $VERSION = '1.20'; require Exporter; our @ISA = qw(Exporter); our %EXPORT_TAGS = ( 'all' => [ qw( fieldhash fieldhashes idhash idhashes id id_2obj register )], ); our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } ); { require XSLoader; my %ob_reg; # private object registry sub _ob_reg { \ %ob_reg } XSLoader::load(); } sub fieldhash (\%) { for ( shift ) { return unless ref() && reftype( $_) eq 'HASH'; return $_ if Hash::Util::FieldHash::_fieldhash( $_, 0); return $_ if Hash::Util::FieldHash::_fieldhash( $_, 2) == 2; return; } } sub idhash (\%) { for ( shift ) { return unless ref() && reftype( $_) eq 'HASH'; return $_ if Hash::Util::FieldHash::_fieldhash( $_, 0); return $_ if Hash::Util::FieldHash::_fieldhash( $_, 1) == 1; return; } } sub fieldhashes { map &fieldhash( $_), @_ } sub idhashes { map &idhash( $_), @_ } 1; __END__ =head1 NAME Hash::Util::FieldHash - Support for Inside-Out Classes =head1 SYNOPSIS ### Create fieldhashes use Hash::Util qw(fieldhash fieldhashes); # Create a single field hash fieldhash my %foo; # Create three at once... fieldhashes \ my(%foo, %bar, %baz); # ...or any number fieldhashes @hashrefs; ### Create an idhash and register it for garbage collection use Hash::Util::FieldHash qw(idhash register); idhash my %name; my $object = \ do { my $o }; # register the idhash for garbage collection with $object register($object, \ %name); # the following entry will be deleted when $object goes out of scope $name{$object} = 'John Doe'; ### Register an ordinary hash for garbage collection use Hash::Util::FieldHash qw(id register); my %name; my $object = \ do { my $o }; # register the hash %name for garbage collection of $object's id register $object, \ %name; # the following entry will be deleted when $object goes out of scope $name{id $object} = 'John Doe'; =head1 FUNCTIONS C offers a number of functions in support of L of class construction. =over =item id id($obj) Returns the reference address of a reference $obj. If $obj is not a reference, returns $obj. This function is a stand-in replacement for L, that is, it returns the reference address of its argument as a numeric value. The only difference is that C returns C when given a non-reference while C returns its argument unchanged. C also uses a caching technique that makes it faster when the id of an object is requested often, but slower if it is needed only once or twice. =item id_2obj $obj = id_2obj($id) If C<$id> is the id of a registered object (see L), returns the object, otherwise an undefined value. For registered objects this is the inverse function of C. =item register register($obj) register($obj, @hashrefs) In the first form, registers an object to work with for the function C. In the second form, it additionally marks the given hashref