JE::_FieldHash - This module is solely for JE's private use.


JE documentation Contained in the JE distribution.

Index


Code Index:

NAME

Top

JE::_FieldHash - This module is solely for JE's private use.

SYNOPSIS

Top

  use JE::_FieldHash;
  fieldhash my %foo;

DESCRIPTION

Top

This is a thin wrapper around Hash::Util::FieldHash, or Tie::RefHash::Weak if the former is not available. It is liable to change or vanish without notice.

SEE ALSO

Top

JE


JE documentation Contained in the JE distribution.

package JE::_FieldHash;

our $VERSION = '0.042';


use strict;
use warnings;

BEGIN {
	eval { require Hash::Util::FieldHash;
	       import  Hash::Util::FieldHash 'fieldhash'; };
	if ($@) {
		require Tie::RefHash::Weak;
		eval 'sub fieldhash(\%) {
						tie %{$_[0]}, "Tie::RefHash::Weak";
						$_[0];
				}';
	}
}

use Exporter 5.57 'import';

our @EXPORT = 'fieldhash'; # this returns a veracious value

__END__