Apache-HeavyCGI
view release on metacpan or search on metacpan
lib/Apache/HeavyCGI.pm view on Meta::CPAN
request can go by unnoticed. This laissez-faire principle gets in the
way when you try to establish a server that is entirely driven by
dynamic components and the number of hits is significant.
=head2 Header Composition, Parameter Processing, and Content Creation
The three big tasks a CGI script has to master are Headers, Parameters
and the Content. In general one can say, content creation SHOULD not
start before all parameters are processed. In complex scenarios you
MUST expect that the whole layout may depend on one parameter.
Additionally we can say that some header related data SHOULD be
processed very early because they might result in a shortcut that
saves us a lot of processing.
Consequently, Apache::HeavyCGI divides the tasks to be done for a
request into four phases and distributes the four phases among an
arbitrary number of modules. Which modules are participating in the
creation of a page is the design decision of the programmer.
The perl model that maps (at least IMHO) ideally to this task
description is an object oriented approach that identifies a couple of
lib/Apache/HeavyCGI/Layout.pm view on Meta::CPAN
=head1 DESCRIPTION
The constructor new() takes as an argument an array of elements.
Elements may be strings and objects in any order.
The content() method returns the array of elements.
The prejoin() method joins adjacent string elements, leaving at most
one string element between objects in the array.
The as_string() method takes an object, say $mgr, as an argument and
joins all elements of the array such that all chunks that represent an
object are called with
$chunk->as_string($mgr)
and all chunks that represent a string are fillers in between. Objects
that do not understand the as_string method are just filled in as
strings, leaving room for debugging or overloading or whatever.
=cut
( run in 0.809 second using v1.01-cache-2.11-cpan-d7a12ab2c7f )