NAME
WaitReSS::Config - WaitReSS configuration
VERSION
version 0.003
SYNOPSIS
use WaitReSS::Config;
# $config is automatically available
my $val = $config->get( "foo.bar.baz" );
$config->set( "foo.bar.baz", 42 );
$config->save;
# or you can create your config yourself, but what's the point?
my $config = WaitRess::Config->new( file => "/path/to/file" );
# or even
$config->set_file( "/path/to/another/file" );
DESCRIPTION
This module implements a basic persistant configuration. The configuration is stored as YAML, yet keys are flattened using dots - eg, a foo.bar.baz
key will fetch at depth 3.
Loading this module will automatically import $config
in your module.
ATTRIBUTES
file
The configuration file path.
METHODS
save
$config->save;
Save $config
to its on-disk file.
get
my $value = $config->get( $key );
Return the $value
associated to $key
in $config
.
set
$config->set( $key, $value );
Associate a given $value
to a $key
in $config
.
delete
$config->delete( $key );
Remove a $key
from $config
.
AUTHOR
Jerome Quelin <jquelin@gmail.com>
COPYRIGHT AND LICENSE
This software is copyright (c) 2013 by Jerome Quelin.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.