Last change: 2007-10-15
PApp is a framework for developing multi-page web applications in
perl that preserve state across page views. It also tracks user id's,
supports a user access system and provides many utility functions (html,
Advantages and Disadvantages of using PApp
I've put the slides for my linuxworld presentation on the docs page.
Please see also the document I wrote for one of my
presentations about PApp, which enumerates the most important features
- Speed. PApp isn't much slower than a hand-coded mod_perl handler,
and this is only due to the extra database request to fetch and restore
state, which typically you would do anyway. To the contrary: a non-trivial
Apache::Registry page is much slower than the equivalent PApp application
(or much, much more complicated)
- Embedded Perl. You can freely embed perl into your documents. In
fact, You can do things like these:
<h1>Names and amounts</h1>
my $st = sql_exec "select name, amount from ...",
while ($st->fetch) ?>
Name: $name, Amount: $amount<p>
That is, mixing html and perl at statement boundaries.
- State-preserving: The global hash
%S is automaticaly preserved
during the session. Everything you save there will be available in any
subsequent pages that the user accesses.
- XML. PApp-applications are written in XML. While this is no advantage
- Easy internationalization. I18n has never been that easy: just
mark you strings with
", either in html or in the perl
source. The "poedit"-demo-application enables editing of the strings
on-line, so translaters need not touch any text files and can work
diretcly via the web.
- Feature-Rich. PApp comes with a lot of small-but-nice-to-have
- Perl5.7-DEVEL is required. Randal Schwartz asked me to provide some
explanation on why this is so (back then only 5.6 was required, but 5.6.0
is waaay to buggy):
"As for an explanation, I require perl5.6 because I require a whole
lot of features of 5.6 (e.g. DB.pm, utf-8 support, "our", bugfixes,
3-argument open, regex improvements, probably many others, especially
changes on the XS level). In the future it will likely require weak
references, filehandle autovivification, the XSLoader for extra speed in
rare circumstances... I don't want to backport this to older versions ;)"
- PApp, the main module.
- PApp::SQL, easy and fast SQL support.
- PApp::XML, xml templates and more.
- PApp::XSLT, xslt stylesheet processing.
- PApp::Env, communicate between processes and the outside.
- PApp::HTML, badly-written HTML support macros.
- PApp::FormBuffer, multipart/form streaming buffer.
- PApp::Exception, exception handling.
- PApp::Callback, a workaround for the problem of nonserializable code.
- PApp::Application, implements the PApp::Application class.
- PApp::Package, implements namespaces and submodules.
- PApp::Parser, papp-file parser and compiler.
- PApp::Config, holds PApp configuration parameters.
- PApp::Recode, character set conversion.
- PApp::User, manipulate user/groups.
- PApp::Util, various utility-junk.
- PApp::Lock, persistant, breakable, verbose locks.
- PApp::I18n, implements the internationalization support.
- PApp::Apache, glue module for mod_perl operation.
- PApp::Admin, common administrative tasks.
- PApp::PCode, intermediate embedded perl representation.
- PApp::CGI, unfinished glue module for standalone CGI operation.
- PApp::Log, logfile analyzing and state cache cleanup.
- macro/admin, user access utilities for PApp.
- macro/util, some utility functions.
- macro/editform, macros used for creating sql editing forms.
- bin/papp-env, utility to set/clear/display/list papp environment variables.
- bin/papp-admin, administrate PApp from the commandline.
- bin/papp-httpd, simple webserver to get started quickly.
PApp is available on any
CPAN mirror. Anonymous
CVS access is available on request.
Among other things, you need perl-devel.
Below are the first sixty-four lines of the Changes file, taken directly
off my harddisk, so this is the most up-to-date thing on PApp you can
--- CUT ---
Any questions/hints/critics? Contact the author of this page!