Config::Model::HashId - Handle hash element for configuration model
version 2.078
See "SYNOPSIS" in Config::Model::AnyId
This class provides hash elements for a Config::Model::Node.
The hash index can either be en enumerated type, a boolean, an integer or a string.
HashId object should not be created directly.
See model declaration section from Config::Model::AnyId.
Returns hash.
hash
Returns the number of elements of the hash.
Sort an ordered hash. Throws an error if called on a non ordered hash.
Returns the first key of the hash. Behaves like each core perl function.
each
Returns the next key of the hash. Behaves like each core perl function.
Swap the order of the 2 keys. Ignored for non ordered hash.
Rename key1 in key2.
Move the first key after the second one. If the second parameter is omitted, the first key is placed in first position. Ignored for non ordered hash.
Move the key up in a ordered hash. Attempt to move up the first key of an ordered hash will be ignored. Ignored for non ordered hash.
Move the key down in a ordered hash. Attempt to move up the last key of an ordered hash will be ignored. Ignored for non ordered hash.
Load check_list as a hash ref for standard hash.
Ordered hash should be loaded with an array ref or with a hash containing a special __order element. E.g. loaded with either:
__order
[ a => 'foo', b => 'bar' ]
or
{ __order => ['a','b'], b => 'bar', a => 'foo' }
load_data can also be called with a single ref parameter.
Dominique Dumont, (ddumont at cpan dot org)
Config::Model, Config::Model::Instance, Config::Model::AnyId, Config::Model::ListId, Config::Model::Value
Dominique Dumont
This software is Copyright (c) 2016 by Dominique Dumont.
This is free software, licensed under:
The GNU Lesser General Public License, Version 2.1, February 1999
To install Config::Model, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Config::Model
CPAN shell
perl -MCPAN -e shell install Config::Model
For more information on module installation, please visit the detailed CPAN module installation guide.