NAME
CTK::Plugin::Config - Configuration plugin
VERSION
Version 1.01
SYNOPSIS
use CTK;
use CTK::ConfGenUtil;
my $ctk = CTK->new(
plugins => "config",
configfile => "test.conf",
root => ".",
confopts => {... Config::General options ...},
);
print $ctk->config("foo");
print value($ctk->config(), "myinc/Test/val2")
DESCRIPTION
Configuration plugin
- configfile
-
Specifies absolute or relative path to config-file
- confopts
-
Options of Config::General
- root
-
Specifies absolute or relative path to config-dir. Root dir of project
See CTK::Configuration and "root" in CTK
METHODS
- conf
-
my $value = $ctk->conf("key");
Returns config value by key
- config
-
my $value = $ctk->config("key");
Returns config value by key
my $config = $ctk->config();
Returns config-structure as hash-ref
- configobj
-
die $ctk->configobj->error unless $ctk->configobj->status;
Returns config-object
init
Initializer method. Internal use only
HISTORY
See Changes
file
DEPENDENCIES
CTK, CTK::Plugin, CTK::Configuration
TO DO
See TODO
file
BUGS
* none noted
SEE ALSO
CTK, CTK::Plugin, CTK::Configuration
AUTHOR
Serż Minus (Sergey Lepenkov) https://www.serzik.com <abalama@cpan.org>
COPYRIGHT
Copyright (C) 1998-2022 D&D Corporation. All Rights Reserved
LICENSE
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See LICENSE
file and https://dev.perl.org/licenses/