parrotcode: Configuration data container | |
Contents | Perl Modules |
Parrot::Configure::Data - Configuration data container
use Parrot::Configure::Data;
my $data = Parrot::Configure::Data->new;
my @values = $data->get(@keys);
$data->set($key1 => $value1, $key2 => $value2);
$data->add($delimiter, $key1 => $value1, $key2 => $value2);
my @keys = $data->keys;
my $serialized = $data->dump;
$data->clean;
$data->settrigger($key, $trigger, $cb);
$data->gettriggers($key);
$data->gettrigger($key, $trigger);
$data->deltrigger($key, $trigger);
This module contains configuration data for use by the other Parrot::Configure::* modules.
This module accepts no arguments to its import
method and exports no symbols.
new()
get($key, ...)
set($key =
$val, ...)>key => value
pairs and returns a Parrot::Configure::Data object.add($delim, $key =
$val, ...)>$delim
.key => value
pairs and returns a Parrot::Configure::Data object.keys()
slurp()
slurp_temp()
gen::makefiles
plugin.dump()
eval
ed. The variable name of the structure is PConfig
.dump_temp()
eval
ed. The variable name of the structure is PConfig_Temp
.clean()
/^TEMP_/
from the internal config store, and copies them to a special store for temporary keys. Keys using this naming convention are intended to be used only temporally, e.g. as file lists for Makefile generation. Temporary keys are used only to regenerate makefiles after configuration.settrigger($key, $trigger, $cb)
$key
named $trigger
. Multiple triggers can be set on a given key. When the key is set via set
or add
then all callbacks that are defined will be called. Triggers are passed the key and value that was set after it has been changed.CODE
ref and returns a Parrot::Configure::Data object.gettriggers($key)
$key
.gettrigger($key, $trigger)
$key
under the name $trigger
CODE
ref.deltrigger($key, $trigger)
$key
named by $trigger
Based largely on code written by Brent Royal-Gordon brent@brentdax.com
.
Joshua Hoblitt jhoblitt@cpan.org
docs/configuration.pod, Parrot::Configure, Parrot::Configure::Step, Parrot::Configure::Step::Base
|