From OpenWetWare  Revision as of 15:43, 28 March 2006 by Ilya
(Talk | contribs) Jump to: navigation, search        • builds
upon CGI adding a structure for writing truly reusable Web-
applications   • "run-mode" - single screen of an application
• "Mode Parameter" is used to store (and retrieve) the current
run-mode of your application   • maps each run-mode to a
specific Perl subroutine ("Run-Mode Method") that implements the
behavior of a single run-mode   • an "abstract class", and is
only used via inheritance package Your::Web::Application; use
base 'CGI::Application';   • setup() method defines a map
between run-modes and run-mode methods   • run-mode methods are
responsible for setting up the HTTP and HTML output   • run-mode
methods should never print() anything to STDOUT   • run() method
is singularly responsible for actually sending all HTTP headers
and HTML content to the Web browser   • your run-mode method is
called by the run() method, and your code is expected to return
a scalar containing all