NAME

CTK::Plugin::Config - Configuration plugin

VERSION

Version 1.00

SYNOPSIS

    use CTK;
    use CTK::ConfGenUtil;

    my $ctk = new CTK(
            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

See "config" in CTK::Configuration

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

See "get" in CTK::Configuration

config
    my $value = $ctk->config("key");

Returns config value by key

    my $config = $ctk->config();

Returns config-structure as hash-ref

See "conf" in CTK::Configuration

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) http://www.serzik.com <abalama@cpan.org>

COPYRIGHT

Copyright (C) 1998-2019 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/