Argon - Common methods used by many application classes.
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()
Apache::XPP
Nothing
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?
%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.
new
Creates a new Application object.
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
Returns cgi params.
escape
Returns cgi escape.
delete
Deletes from the cgi params.
include
Forwarding method:
Calls Apache::XPP->include() and passes it the $template.
xinclude
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.
$Log: Argon.pm,v $ Revision 2.9 2001/11/20 19:11:14 gefilte AUTOLOAD() - named method splitting set to '2' results. (This was breaking names which intentionally contained underscores, since the split parts were not captured.) - fully qualified left over 'Dumper' call Revision 2.8 2000/12/12 18:48:01 useevil - updated version for new release: 1.92 Revision 2.7 2000/10/20 17:23:18 gefilte Removed Data::Dumper requirement. (Only loaded if $debug is on.) Revision 2.6 2000/10/20 00:28:24 zhobson Added some useful debug messages to AUTOLOAD Revision 2.5 2000/09/19 23:40:00 dweimer Version update 1.91 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
"Ray, when someone asks you if you're a god, you say YES!"
-Winston
perl(1).
None
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
Colin Bielen <colin@cnation.com>
To install BingoX::Time, copy and paste the appropriate command in to your terminal.
cpanm
cpanm BingoX::Time
CPAN shell
perl -MCPAN -e shell install BingoX::Time
For more information on module installation, please visit the detailed CPAN module installation guide.