Hash::Util::FieldHash::Compat - Use Hash::Util::FieldHash or ties, depending on availability.
use Hash::Util::FieldHash::Compat; # pretend you are using L<Hash::Util::FieldHash> # under older perls it'll be Tie::RefHash::Weak instead (slower, but same behavior)
Under older perls this module provides a drop in compatible api to Hash::Util::FieldHash using perltie. When Hash::Util::FieldHash is available it will use that instead.
This way code requiring field hashes can benefit from fast, robust field hashes on Perl 5.10 and newer, but still run on older perls that don't ship with that module.
See Hash::Util::FieldHash for all the details of the API.
Hash::Util::FieldHash, Tie::RefHash, Tie::RefHash::Weak.
This module is maintained using Darcs. You can get the latest version from http://nothingmuch.woobling.org/code, and use darcs send to commit changes.
darcs send
Yuval Kogman <nothingmuch@woobling.org>
Copyright (c) 2008 Yuval Kogman. All rights reserved This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Hash::Util::FieldHash::Compat, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Hash::Util::FieldHash::Compat
CPAN shell
perl -MCPAN -e shell install Hash::Util::FieldHash::Compat
For more information on module installation, please visit the detailed CPAN module installation guide.