Home | Tie::Indexed::Hash


NAME

Tie::Indexed::Hash - A tweaked version of the venerable Tie::IxHash.

Back to top


VERSION

Version 0.02

Back to top


SYNOPSIS

If you do not need the OO interface of Tie::IxHash, then strongly consider replacing Tie::IxHash with this module because Tie::Indexed::Hash runs between 14% and 33% faster for "normal" operations (see the BENCHMARKS file for the details, in particular the "Clear/Reassign" benchmarks).

    use Tie::Indexed::Hash;
    
    my %indexed;
    tie %indexed, 'Tie::Indexed::Hash';

Back to top


SUBROUTINES/METHODS

These are the standard TIEHASH methods required by Perl. You may use them directly if you really want to.

TIEHASH

Initializes this tied hash.

FETCH

Returns the value associated with the given key or undef if the key does not exist.

STORE

Save the given key/value pair in this tied hash.

DELETE

Removes a key from this tied hash and returns its value or undef if the key does not exist.

CLEAR

Sets this tied hash back to its initial starting conditions.

EXISTS

Returns true if the given key exists, false otherwise.

FIRSTKEY

Initialize the key counter and return the first key or undef if there are no keys in this tied hash.

NEXTKEY

Return all subsequent keys after the first key; returns undef at the end of the key list.

SCALAR

Returns a scalar representation of this tied hash.

DESTROY

Unused; we have no need to do any cleanup immediately before this tied hash is destroyed.

UNTIE

Unused; we have no need to do any cleanup immediately before this tied hash is unbound.

Back to top


AUTHOR

Calvin Schwenzfeier, <calvin DOT schwenzfeier a~t gmail dotCOM>

Back to top


BUGS

Please report any bugs or feature requests through GitHub's issue tracker web interface at http://github.com/cschwenz/Tie-Indexed-Hash/issues.

Back to top


SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc Tie::Indexed::Hash

You can also look for information at:

Back to top


ACKNOWLEDGEMENTS

I would like to thank Richard Balint for the original idea and concept code.

Back to top


LICENSE AND COPYRIGHT

Copyright 2010 Calvin Schwenzfeier.

This program is free software; you can redistribute it and/or modify it under the terms of either:

a)

the GNU General Public License [http://dev.perl.org/licenses/gpl1.html] as published by the Free Software Foundation [http://www.fsf.org/]; either version 1 [http://dev.perl.org/licenses/gpl1.html], or (at your option) any later version [http://www.fsf.org/licensing/licenses/#GNUGPL], or

b)

the "Artistic License" [http://dev.perl.org/licenses/artistic.html].

    
    For those of you that choose to use the GNU General Public License, my
    interpretation of the GNU General Public License is that no Perl script
    falls under the terms of the GPL unless you explicitly put said script under
    the terms of the GPL yourself.
    
    Furthermore, any object code linked with perl does not automatically fall
    under the terms of the GPL, provided such object code only adds definitions
    of subroutines and variables, and does not otherwise impair the resulting
    interpreter from executing any standard Perl script. I consider linking in C
    subroutines in this manner to be the moral equivalent of defining
    subroutines in the Perl language itself. You may sell such an object file as
    proprietary provided that you provide or offer to provide the Perl source,
    as specified by the GNU General Public License. (This is merely an alternate
    way of specifying input to the program.) You may also sell a binary produced
    by the dumping of a running Perl script that belongs to you, provided that
    you provide or offer to provide the Perl source as specified by the GPL.
    (The fact that a Perl interpreter and your code are in the same binary file
    is, in this case, a form of mere aggregation.)
    
    This is my interpretation of the GPL. If you still have concerns or
    difficulties understanding my intent, feel free to contact me. Of course,
    the Artistic License spells all this out for your protection, so you may
    prefer to use that.
    
    -- Larry Wall

See http://dev.perl.org/licenses/ for more information.

Voir http://dev.perl.org/licenses/ pour plus d'information.

Ver http://dev.perl.org/licenses/ para más información.

См. http://dev.perl.org/licenses/ За дополнительной информацией.

Se http://dev.perl.org/licenses/ kwa taarifa zaidi.

Féach http://dev.perl.org/licenses/ le haghaidh tuilleadh eolais.

Se http://dev.perl.org/licenses/ för mer information.

Back to top