Tie::Judy - Perl extension for using a Judy array instead of a hash.
use Tie::Judy; tie %judy, 'Tie::Judy'; # %judy now reads and writes to a Judy array. keys %judy; # the keys here are in bit-wise SORTED order. values %judy; # the values here are in the same order as the keys 0 + %judy; # returns the number of keys # method to add lots of entries at once (tied %judy)->insert( { key => 'value', ... } ); (tied %judy)->insert( key => 'value', ... ); # method to retrieve lots of values at once (tied %judy)->retrieve( 'key1', 'key2', ... ); # method to remove lots of entries at once (tied %judy)->remove( 'key1', 'key2', ... ); # OBJECT-ORIENTED INTERFACE my $judy = Tie::Judy->new(); @keys = $judy->keys; @values = $judy->values; $count = $judy->count; $judy->insert( key => 'value', ... ); $judy->insert( { key => 'value', ... } ); # retrieve and remove return arrays in list context, array refs in scalar context $judy->retrieve( 'key1', 'key2', ... ); $judy->remove( 'key1', 'key2', ... );
No exports.
The Judy Array project page: http://judy.sourceforge.net/
Benjamin Holzman, <bholzman@earthlink.net<gt>
Copyright (C) 2005 by Benjamin Holzman
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.5 or, at your option, any later version of Perl 5 you may have available.
To install Tie::Judy, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Tie::Judy
CPAN shell
perl -MCPAN -e shell install Tie::Judy
For more information on module installation, please visit the detailed CPAN module installation guide.