Home | Wiki | OI 1.x Docs | OI 2.x Docs |
OpenInteract2::Constants - Define codes used throughout OpenInteract
# Just bring in a couple use OpenInteract2::Constants qw( OI_OK OI_ERROR LOG_ACTION ); # Bring in all OI status constants use OpenInteract2::Constants qw( :oi ); # Bring in all logging constants use OpenInteract2::Constants qw( :log ); # Open the gates, bring them all in use OpenInteract2::Constants qw( :all ); # Using constants when generating content sub blah { return ( "I'm the man!", OI_OK ); } sub barf { return ( "So it goes, I've failed", OI_ERROR ); }
This module defines constants used throughout OpenInteract. Most often you will see the various status constants returned from actions that generate content.
The different logging levels are listed below in order from highest to
lowest. The low levels include all other levels above them. See
OpenInteract2::Context for how the different
levels are used in conjunction with the log()
method of the context
object.
LALL
The LALL
level has the highest possible rank and is intended to turn
on all logging.
LDEBUG
The LDEBUG
level designates fine-grained informational events that
are most useful to debug an application.
LINFO
The LINFO
level designates informational messages that highlight
the progress of the application at coarse-grained level.
LWARN
The LWARN
level designates potentially harmful situations.
LERROR
The LERROR
level designates error events that might still allow the
application to continue running.
LFATAL
The LFATAL
level designates very severe error events that will
presumably lead the application to abort.
LOFF
The LOFF
level has the lowest possible rank and is intended to
turn off logging.
These are default filenames and directories for various items in OI2:
BASE_CONF_DIR: This is the default directory under the website where you can find the base configuration. This is normally 'conf'.
BASE_CONF_FILE: This is the default filename for the base configuration. It is normally 'base.conf'.
Agreed-upon strings used for storing standard items in template variables.
ACTION_KEY: Retrieve the action spawning this generation request
REQUEST_KEY: Retrieve the OpenInteract2::Request object
RESPONSE_KEY: Retrieve the OpenInteract2::Response object
TODO: Do we need request/response?
None, just exported constants.
Copyright (c) 2001-2003 Chris Winters. All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Chris Winters <chris@cwinters.com>
Generated from the OpenInteract 1.99_03 source.