NAME
Argon - Common methods used by many application classes.
SYNOPSIS
package MyApplication; @MyApplication::ISA = qw(BingoX::Argon); use BingoX::Argon;
# $BR - Blessed Reference
# $SV - Scalar Value
# @AV - Array Value
# $HR - Hash Ref
# $AR - Array Ref
# $SR - Stream Ref
# $proto - BingoX::Carbon object OR sub-class
# $object - BingoX::Carbon object
$BR = $proto->new()
$BR = $app->r()
$BR = $app->dbh()
$BR = $app->cgi()
$BR = $app->conf()
$app->include()
$app->xinclude()
$HR = $app->display_classes()
$BR = $app->get()
$AR = $app->list()
$SR = $app->stream()
REQUIRES
Apache::XPP
EXPORTS
Nothing
DESCRIPTION
BingoX::Argon is an application superclass that handles basic tasks like returning display objects, handling xincludes, and caching request and cgi objects.
I'm hoping it won't do too much else: Display classes have to do SOMETHING, don't they?
CLASS VARIABLES
%display_classes
This is how Argon will know what classes it can call. The keys are the name of the function and the value is the class name.
For example: %display_classes = (thingees => 'Application::Display::Thingee');
You can then call get_ , list_ , or stream_thingees(), passing a hashref of the data fields by which you want to limit your search.
METHODS
CONSTRUCTORS
OBJECT METHODS
r
( )-
returns the Display object's Apache request object. Or if for some reason the object doesn't have one, it creates a new one.
available_display_classes
( )-
Static method returns the subclass's \%display_classes.
data_class
( )-
Static method returns data class defined for application subclass. If none is assigned, guess. :-)
dbh
( )-
Caches and returns a reference to the app's Data Class dbh.
cgi
( )-
Returns the current CGI object or creates a new one.
conf
( )-
Caches and returns a Conf object. Overload this if you want to use a static Conf module.
query_url
( )-
Returns the path of the user's location.
param
( $name )-
Returns cgi params.
escape
( $name )-
Returns cgi escape.
delete
( $name )-
Deletes from the cgi params.
include
( $template )-
Forwarding method:
Calls Apache::XPP->include() and passes it the $template.
xinclude
( $template [, $obj ] )-
Forwarding method:
Includes $obj in the $template. Calls Apache::XPP-xinclude()> and passes it the default array.
AUTOLOAD
( )-
This will first look in instance data, then go through the sub class's %display_classes field and see if it's in %display_classes reference. If it is, it will try and get it using passed params.
Returns undef on error.
REVISION HISTORY
$Log: Argon.pm,v $
Revision 2.5 2000/09/19 23:01:56 dougw
Version update
Revision 2.4 2000/08/31 21:54:18 greg
Added COPYRIGHT information.
Added file COPYING (LGPL).
Cleaned up POD.
Moved into BingoX namespace.
References to Bingo::XPP now point to Apache::XPP.
"To the first approximation, syntactic sugar is trivial to implement.
To the second approximation, the first approximation is totally bogus."
-Larry Wall
Revision 2.3 2000/08/01 00:38:28 thai
- added cgi accessor methods:
query_url()
param()
escape()
delete()
Revision 2.2 2000/07/12 19:28:21 thai
- fixed POD, cleaned up code
Revision 2.1 2000/05/19 01:22:56 thai
- cleaned up code
- is the top level class for all Bingo Applications
Revision 2.0 2000/05/02 00:54:33 thai
- committed as 2.0
THOUGHTS, LYRICS, POEMS, CANTRIPS, RHYMES
"Ray, when someone asks you if you're a god, you say YES!"
-Winston
SEE ALSO
perl(1).
KNOWN BUGS
None
COPYRIGHT
Copyright (c) 2000, Cnation Inc. All Rights Reserved. This module is free
software. It may be used, redistributed and/or modified under the terms
of the GNU Lesser General Public License as published by the Free Software
Foundation.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, write to the Free Software Foundation, Inc.,
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
AUTHOR
Colin Bielen <colin@cnation.com>