Anton Belousov > Eidolon > Eidolon::Core::Config

Download:
Eidolon-0.02.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.02   Source  

NAME ^

Eidolon::Core::Config - generic configuration of the Eidolon application.

SYNOPSIS ^

Example application configuration (lib/Example/Config.pm):

    package Example::Config;
    use base qw/Eidolon::Core::Config/;

    our $VERSION  = "0.01";

    sub new
    {
        my ($class, $name, $type, $self);

        ($class, $name, $type) = @_;

        $self = $class->SUPER::new($name, $type);
        $self->{"app"}->{"title"} = "Example application";

        $self->{"drivers"} = 
        [
            {
                "class" => "Eidolon::Driver::Router::Basic"
            }
        ];

        return $self;
    }

DESCRIPTION ^

The Eidolon::Core::Config class holds common configuration for all Eidolon applications. Each application configuration should inherit this class and redefine generic parameters. This class should never be used directly.

Application configuration section

Main application settings are specified in {"app"} item of configuration hash. This item contains a hashref of application settings:

CGI configuration section

CGI settings are specified in {"cgi"} item of configuration hash. This item contains a hashref of CGI settings:

Drivers configuration section

Drivers configuration is specified in {"drivers"} item of a configuration hash. This item is the reference to array of hashrefs, each hashref represents one driver configuration. Hashref items are:

METHODS ^

new($name, $type)

Class constructor. Creates generic configuration for application $name of $type type.

get_instance()

Returns configuration instance. Class must be instantiated first.

SEE ALSO ^

Eidolon, Eidolon::Application

LICENSE ^

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

AUTHOR ^

Anton Belousov, <abel@cpan.org>

COPYRIGHT ^

Copyright (c) 2009, Atma 7, http://www.atma7.com

syntax highlighting: