GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  CONFIG::OBJECTIVE::HASH (3)

.ds Aq ’

NAME

Config::Objective::Hash - hash data type class for Config::Objective

CONTENTS

SYNOPSIS



  use Config::Objective;
  use Config::Objective::Hash;

  my $conf = Config::Objective->new(filename, {
                        hashobj       => Config::Objective::Hash->new(
                                                        value_abspath => 1,
                                                        ...
                                                )
                });



DESCRIPTION

The <B>Config::Objective::HashB> module provides a class that represents a hash in an object so that it can be used with <B>Config::ObjectiveB>. Its methods can be used to manipulate the encapsulated hash from the config file.

The <B>Config::Objective::HashB> class is derived from the <B>Config::Objective::DataTypeB> class, but it defines/overrides the following methods:
insert() Inserts the specified values into the object’s hash. The argument must be a reference to a hash, whose keys and values are copied into the object’s hash.

If the values are lists, inserting a key that already exists will append the new list to the existing list. If the values are hashes, inserting a key that already exists will insert the new key/value pairs into the existing value hash.

If the object was created with the value_optional attribute enabled, keys may be inserted with no defined values.

If the object was created with the value_type attribute set to either ARRAY or HASH, then the hash values must be references to the corresponding structure type.

If the object was created with the value_abspath attribute enabled, the hash values must be absolute path strings.

If the object was created with the key_abspath attribute enabled, the hash keys must be absolute path strings.

set() The same as insert(), except that the existing hash is emptied by calling the unset() method before inserting the new data.
default() Calls the insert() method.
unset() Sets the object’s value to an empty hash.
delete() Deletes a specific hash key. The argument can be a scalar or a reference to a list, in which case all of the keys in the list are deleted.
exists() Returns true if the argument is found in the hash, false otherwise.
find() If the argument is found in the hash, returns its value. Otherwise, returns false.

BUGS

The value_abspath and key_abspath attributes should be replaced by a generic mechanism that allows the caller to supply a reference to a subroutine that will be called to validate the key and value data.

AUTHOR

Mark D. Roth <roth@uiuc.edu>

SEE ALSO

perl

Config::Objective

Config::Objective::DataType

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 CONFIG::OBJECTIVE::HASH (3) 2003-07-23

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.