17 Jan 2002 03:32:09 UTC
- Distribution: BingoX
- Module version: 1.92
- Source (raw)
- Browse (raw)
- How to Contribute
- Testers (1 / 0 / 0)
- KwaliteeBus factor: 1
- % Coverage
- License: unknown
- Activity24 month
- Download (73.77KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest version
- CLASS VARIABLES
- REVISION HISTORY
- THOUGHTS, LYRICS, POEMS, CANTRIPS, RHYMES
- SEE ALSO
- KNOWN BUGS
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()
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?
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.
returns the Display object's Apache request object. Or if for some reason the object doesn't have one, it creates a new one.
Static method returns the subclass's \%display_classes.
Static method returns data class defined for application subclass. If none is assigned, guess. :-)
Caches and returns a reference to the app's Data Class dbh.
Returns the current CGI object or creates a new one.
Caches and returns a Conf object. Overload this if you want to use a static Conf module.
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 )
Calls Apache::XPP->include() and passes it the $template.
xinclude( $template [, $obj ] )
Includes $obj in the $template. Calls Apache::XPP-xinclude()> and passes it the default array.
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!"
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 <email@example.com>