The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Eidolon::Core::Registry - global data storage for the Eidolon application.

SYNOPSIS

Somewhere in application controllers:

    my $r = Eidolon::Core::Registry->get_instance;
    $r->cgi->send_header;

    my $tpl = $r->loader->get_object("Eidolon::Driver::Template");
    $tpl->parse("index.tpl");
    $tpl->render;

DESCRIPTION

The Eidolon::Core::Registry class creates a global data storage object for the whole Eidolon application. It is instantiated and filled in during applicaton initialization and request processing flow. You can use it anywhere in application.

In Eidolon documentation examples Eidolon::Core::Registry is referred as $r variable.

Mount points

During initialization and request handling application mounts each vital object to system registry to allow other application parts to use them later. This is the list of all mount points, that are created by Eidolon::Application:

$r->config

Application configuration object (see "Load application configuration" in Eidolon::Application and Eidolon::Core::Config module documentation).

$r->cgi

CGI object (see Eidolon::Core::CGI for more information).

$r->loader

Driver loader object (see Eidolon::Core::Loader documentation).

METHODS

new()

Class constructor. Creates global data storage.

get_instance()

Returns registry instance. Class must be instantiated first.

free()

Destroys Eidolon::Core::CGI and Eidolon::Core::Loader objects.

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