MToken::Config - MToken global and local configuration
Version 1.00
use MToken::Config; my $config = new MToken::Config( global_file => '/foo/bar/global.conf', local_file => '/foo/bar/local.conf', name => 'foo', # Optional ); my $foo = $config->get('foo'); my $foo = $config->set('foo' => 'bar'); my $status = $config->save(); # Local file only
The module works with the configuration data
my $config = new WWW::MLite::Config( global_file => '/foo/bar/global.conf', local_file => '/foo/bar/local.conf', name => 'foo', # Optional );
Returns configuration object
my $value = $config->get( 'key' );
Returns value by keyname
my %config = $config->getall;
Returns all allowed pairs - key and value
$config->set( 'key', $value );
Set new value for key. Returns status of the operation
$config->save;
Save current configuration to local_file and returns status of the operation
See CHANGES file
CHANGES
Sergey Lepenkov (Serz Minus) http://www.serzik.com <abalama@cpan.org>
Copyright (C) 1998-2017 D&D Corporation. All Rights Reserved
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
See LICENSE file
LICENSE
To install MToken, copy and paste the appropriate command in to your terminal.
cpanm
cpanm MToken
CPAN shell
perl -MCPAN -e shell install MToken
For more information on module installation, please visit the detailed CPAN module installation guide.