Docs » WebApp::Component
Component HTML generation code
TABLE OF CONTENTS
NAME
Webapp::Component - Component HTML generation code
VERSION
Time-stamp: <2007-06-14 13:34:34 mailto:snl@cluefactory.com> $Id: Component.pm,v 1.41 2006/04/26 03:52:02 attila Exp $
SYNOPSIS
use WebApp::Component; ## the main program of a CGI program might look like: WebApp::Component::Main( dsn => "dbi:Pg:dbname=app_db", dbuser => "dbuser", dbpassword => "foo" );
DESCRIPTION
Component is a package that holds all of the logic that drives WebApp. It is meant to be used in a functional style, as opposed to OO-style.
DETAILED DOCUMENTATION
setup_session
This routine has the default logic for associating a WebApp::Session object with an HTTP session. It knows about a lot of things that every webapp might not have, like logging in, and so on.
Main
WebApp component logic. Invoke from your main CGI, which should probably just be component.cgi, unless you really know what you are doing... Here is the Main invocation from component.cgi:
%COOKIES = fetch CGI::Cookie;
WebApp::Component::Main(
dsn => $DSN,
dbuser => $DUSER,
dbpassword => $DPASS,
_COOKIES => \%COOKIES,
_COOKIE_NAME => $COOKIE_NAME
);
The various globals are set by configuration code... there is a lot of magic here.
AUTHOR
Sean Levy <mailto:snl@cluefactory.com>
COPYRIGHT AND LICENSE
(C) 2002-2006 by attila <mailto:attila@stalphonsos.com>. all rights reserved.
This code is released under a BSD license. Please see the LICENSE file that came with the source distribution or visit http://cluefactory.com/oss/WebApp/LICENSE