Andrew Sterling Hanenkamp > Contentment-0.011_033 > Contentment

Download:
Contentment-0.011_033.tar.gz

Dependencies

Annotate this POD

Module Version: 0.011_033   Source  

NAME ^

Contentment - Contentment is a Perl-based web content management system

DESCRIPTION ^

METHODS

$global_init = Contentment->global_configuration

Returns the global initializer configuration. This is stored in init.yml in the same directory as the CGI script, as of this writing.

The $global_init should be a reference to a hash.

Contentment->begin

Perform the initialization tasks for Contentment. Including running all hooks registered for "Contentment::begin".

Contentment->handle_cgi

This passes control to the appropriate request and response objects.

See Contentment::Request and Contentment::Response for more information.

Contentment->handle_fast_cgi

This passes control to the appropriate request and response objects to handle FastCGI connections.

See Contentment::Request and Contentment::Response for more information.

Contentment->handle_lwp

Not yet implemented.

Contentment->handle_mod_perl

Not yet implemented.

Contentment->end

Performs final shutdown of the Contentment system. This calls the "Contentment::end" hooks.

$context = Contentment->context

This retrieves the current context for this process. This should return a value other than undef for most of the execution of the Contentment process. However, what features are available will depend upon the current state of the process.

Prior to the "Contentment::begin" hook, most of the plugins may not have been installed or initialized, so the functionality available will be very limited. Even during the "Contentment::begin" hook, many handlers are still initializing the context, so some application level functionality may not yet be available.

Information regarding the request will not be available until the "Contentment::Request::begin" hook is called and goes away after the "Contentment::Request::end" hook is called.

Similarly, information regarding the response will not be available until the "Contentment::Response::begin" hook is called and goes away after the "Contentment::Response::end" hook is called.

You may need to check individual plugin documentation to know when their respective context methods will be available and valid.

See Contentment::Manual::LifeCycle for additional details on the life-cycle of the Contentment application.

HOOKS

Contentment::install

This is a named hook. The name is used to determine which plugin configuration to pass the install handler. It should match the "name" setting in init.yml for the plugin.

These handlers are passed two arguments, but no input, and should not output anything. The first argument is the Contentment context object. The second argument is the data loaded from init.yml. If the second argument's data is modified, those modifications will be permanently saved.

Contentment::upgrade

This is a named hook. The name is used to determine which plugin configuration to pass to the upgrade handler. It should match the "name" setting in init.yml for the plugin.

These handlers are passed three arguments, but no input, and should not ouput anything. The first argument is the Contentment context object. The second argument is the plugin settings currently in use for the plugin (as loaded during the last install or upgrade and since modified). The third argument is the data loaded from init.yml for the plugin.

IMPORTANT: After the upgrade handler is run, the data stored in the third argument will overwrite the data stored in the second. Therefore, any important setting changes the user makes, must be explicitly transferred by the plugin.

Contentment::remove

This hook is currently not called by the system, but will be used in the future to uninstall plugins. The plugin installation/upgrade system is too primitive for this hook to be of much use, as of this writing.

Contentment::begin

These handlers are passed a single argument, which is the context for Contentment. Otherwise, it receives no special input, and should not output anything.

Contentment::end

These handlers are passed a single argument, which is the context for Contentment. Otherwise, it receives no special input, and should not output anything.

AUTHOR ^

Andrew Sterling Hanenkamp <hanenkamp@cpan.org>

COPYRIGHT AND LICENSE ^

Copyright 2005 Andrew Sterling Hanenkamp. All Rights Reserved.

Contentment is distributed and licensed under the same terms as Perl itself.

syntax highlighting: