NAME

Puma::ServerPages::Server - Server object for Puma::ServerPages


SYNOPSIS

 use Puma::ServerPages::Server;
 use Puma::ServerPages::Config qw( getConfig );
 my $server = new Puma::ServerPages::Server(
    Config => getConfig()
 }


DESCRIPTION

Puma::ServerPages::Server combines various elements from CGI, %ENV and other sources to create an object similar to the ASP $Server object.


METHODS

new(Config => CONFIG, XML => XML)

The constructor for the $server object takes one of two parameters: CONFIG, a configuration hash as generated by Puma::ServerPages::Config::getConfig(); or XML, a string representing XML content.

for details of these parameters, see Puma::ServerPages::Config.

$server->getStartCode()

This method is use by the handler to generate the code that is prepended to any rendered page. This code generates constructors for the session objects, sets library paths, creates the $psp hash and initializes any local variables. It also inserts the startscript defined in the configuration XML.

Details about these configuration options are contained in the Puma::ServerPages::Config(3) manpage.

$server->getEndCode()

This method is use by the handler to generate the code that is appended to any rendered page. It is the complement to the getStartCode() method and is used to serialize session objects and add any endscripts defined in the configuration.


SEE ALSO

Puma::ServerPages::Config(3)


COPYRIGHT

Copyright (c) 2001, 2002 by Ingmar Ellenberger.

Distributed under The Artistic License. For the text of this license, see http://puma.site42.com/license.psp or read the file LICENSE in the root of the distribution.