NAME
Object::POOF::App - Perl Object-Oriented Framework - Application Object
SYNOPSIS
Package MyApp::App;
@ISA = qw(Object::POOF::App);
sub init {
my ($self,$p) = @_;
$self->{sess_table} = "MyApp_Sessions";
$self->{sess_dbuname} = "myapp";
$self->{sess_dbpasswd} = "dbpassword_string";
# this calls Object::POOF::App::Web->init()
# or Object::POOF::App::Term->init() automagically
# because Object::POOF::App->new calls the right new()
#
# well, that's the theory, but Term apps aren't implemented
my $status = $self->SUPER::init;
if (defined $status) {
my $croak = __PACKAGE__
."->init(): SUPER::init status: $status\n";
croak $croak;
} else {
return 1;
}
}
sub run {
my ($self,$p) = @_;
$self->SUPER::run;
}
# ... in main script, current example is just for www app:
require MyApp::DB;
require MyApp::App;
my $db = MyApp::DB->new; # inherits from Object::POOF::DB
my $app = MyApp::App->new( db => $db );
$app->run;
DESCRIPTION
Object::POOF::App provides a framework for an object-oriented application. Future plans include a terminal interface, but right now it only supports an Apache mod_perl application. Some libraries are required, like Apache::Session.
To work, user must define at least one Funk (function) library, MyApp::Funk. This is the default function. See Object::POOF::Funk(3).
SEE ALSO
Object::POOF(3), Object::POOF::Funk(3), Object::POOF::App::Web(3),
AUTHOR
Copyright 2005 Mark Hedges <hedges@ucsd.edu>, CPAN: MARKLE
Released under the standard Perl license (GPL/Artistic).