Meta::Ds::Ochash - Ordered hash data structure with parent conectivity.
Copyright (C) 2001, 2002 Mark Veltzer; All rights reserved.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
MANIFEST: Ochash.pm PROJECT: meta VERSION: 0.15
package foo; use Meta::Ds::Ochash qw();
This is an object which is a hash table which can also give you a random element. Any child must inherit from Meta::Ds::Connected and thus be able to retrieve its parent.
new($) insert($$$) remove($$) elem($$) key($$) val($$) print($$) get_elem_number($$) TEST($)
Gives you a new Ochash object.
Inserts an element into the hash. This just does a Hash insert and updates the list if the hash was actually inserted.
Remove an element from the hash. This just calls the Meta::Ds::Hash remove and removes the element from the list if it was successful.
This returns a specific element in the hash.
This returns the key with the specified number.
This returns the value with the specified number.
This will print the Ochash object to the specified file for you.
This method will retrieve the sequential number of an element.
Test suite for this module.
Meta::Ds::Hash(3)
None.
Name: Mark Veltzer Email: mailto:veltzer@cpan.org WWW: http://www.veltzer.org CPAN id: VELTZER
0.00 MV db stuff 0.01 MV finish db export 0.02 MV PDMT/SWIG support 0.03 MV perl packaging 0.04 MV md5 project 0.05 MV database 0.06 MV perl module versions in files 0.07 MV movies and small fixes 0.08 MV graph visualization 0.09 MV more thumbnail stuff 0.10 MV thumbnail user interface 0.11 MV more thumbnail issues 0.12 MV website construction 0.13 MV web site automation 0.14 MV SEE ALSO section fix 0.15 MV md5 issues
Meta::Ds::Hash(3), strict(3)
-add/subtract a hash.
-read/write a hash from a file.
-get a list from a hash.
-get a set from a hash.
-get a hash from a list.
-get a hash from a set.
-insert an element and make sure that he wasnt there.
-remove an element and make sure that he was there.
-add a limitation on the types of objects going into the hash (they must be inheritors from some kind of object).
To install Meta::Init, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Meta::Init
CPAN shell
perl -MCPAN -e shell install Meta::Init
For more information on module installation, please visit the detailed CPAN module installation guide.