Data::Couplet::Private - Private internal bits for Data::Couplet
version 0.02004314
This class contains all the private stuff Data::Couplet uses.
This arrangement is somewhat experimental, but its benefits are as follows
Ensures that other people hacking on internals have plenty to work with
Ensures end users don't get weighed down and tempted by stuff they don't need.
Separates logically the interface from the implementation, allowing for more disperse changes without worry about breaking things.
The above structure could also be reverted back to something more sane, but you shouldn't mind, you don't rely on private methods anyway, do you? :)
These might change yet from a hash quad to something simpler, like
[ k, k, k, ] { k => [ i, k, v ], k => [ i, k, v ] }
Stores a mapping of Keys to Objects.
{ KEY_SCALAR => $KEY_OBJECT }
This is our internal way of mapping scalar representations of objects back to the objects. NB: Because of how the conversion to scalar works at present, if an object is used for a key that has string overload, the overloaded value will be used in the index.
Stores a mapping of Keys to Values
{ KEY_SCALAR => $VALUE_OBJECT }
This is our primary data store, unordered, this is the part of the data that directly represents what you would get with a normal hash.
Stored a mapping of Keys to Indexes.
{ KEY_SCALAR => $INDEX_SCALAR }
This is required if you need to know where in an array a key is without having to search the array for it. It also makes data set reordering much easier, increment values :)
This keeps our keys in order
[ KEY_SCALAR , KEY_SCALAR ]
Maps Anything to a usable Key. Essentially, stringify. This is done this way in case we need to change it later
Deletes things that are found using an index only.
Deletes things that are found using a key only
Move a set of keys in the hash by $amt in $sign direction ->_move_key_range( $start, $stop , -1 ); # move left ->_move_key_range( $start, $stop , +1 ); # move right
Given a key, asserts it is in the data set, either by finding it or by creating it. Returns where the key is.
Insertion is easy. Everything that inserts the easy way can call this.
Handles the part of assigning all the Key => Value association needed in many parts.
Assume _ki is dead, and _ik is in charge, rebuild _ki from _ik
Assume _ik is dead, and _ki is in charge, rebuild _ik from _ki
Kent Fredric <kentnl at cpan.org>
This software is copyright (c) 2011 by Kent Fredric.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Data::Couplet, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Data::Couplet
CPAN shell
perl -MCPAN -e shell install Data::Couplet
For more information on module installation, please visit the detailed CPAN module installation guide.