ANAIO > SweetPea-Application > SweetPea::Application::Config

Download:
SweetPea-Application-0.025.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Source  

NAME ^

SweetPea::Application::Config - Configuration handling for SweetPea-Application.

SYNOPSIS ... from inside SweetPea::Application or a Controller; my $configuration = $s->config->get('/application'); my $datasources = $s->config->get('/datasourses'); ^

METHODS ^

new

    The new method instantiates a new SweetPea::Application::Config object
    which use Config::Any as a base class to provide access to the yml documents.
    
    $s->plug( 'config', sub { return SweetPea::Application::Config->new($s); });

get

    The get method returns a reference to the specific configuration data of
    the key passed to it or returns undefined.
    
    my $foo = $s->config->get('/application');
    if (defined $foo) {
        $foo->{datasource} = 'production';
    }
    else {
        die '/application config file is undefined';
    }

set

    The set method saves any changes to the configuration data of the file
    identified by the key passed to it or returns undefined.

AUTHOR ^

Al Newkirk, <al.newkirk at awnstudio.com>

syntax highlighting: