NAME
Config::Objective::DataType - base class for Config::Objective data types
SYNOPSIS
use Config::Objective;
use Config::Objective::DataType;
my $conf = Config::Objective->new('filename', {
'objname' => Config::Objective::DataType->new(
'attr1' => 0,
'attr2' => "string",
...
)
});
DESCRIPTION
The Config::Objective::DataType module provides a class that encapsulates a value in an object so that it can be used with Config::Objective. Its methods can be used to manipulate the encapsulated value from the config file.
The Config::Objective::DataType class is not intended to be used to directly instantiate configuration objects, but it does support the following methods for use in subclasses:
- new()
-
The constructor. It can be passed a hash to set the object's attributes. The object will be created as a reference to this hash.
The Config::Objective::DataType class itself does not use the attributes in any way. However, they can be useful in subclasses.
- set()
-
Sets the object's value to the supplied value.
- get()
-
Returns the object's value.
- unset()
-
Sets the object's value to undef.
- default()
-
Calls the set() method.
AUTHOR
Mark D. Roth <roth@uiuc.edu>