View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Andreas J. König > Apache-HeavyCGI-0.013302 > Apache::HeavyCGI::Layout



Annotate this POD

View/Report Bugs
Module Version: 1.002   Source  


Apache::HeavyCGI::Layout - Represent a page layout in an array


 my $layout = Apache::HeavyCGI::Layout->new(@array);

 $layout->prejoin;  # make the array more compact

 my @array = $layout->content;
 my $string = $layout->as_string($object);


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


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.

syntax highlighting: