Wombat::Server - server class
my $wombat = Wombat::Server(); $wombat->setHome('/usr/local/wombat'); $wombat->setConfigFile('conf/server.xml'); $wombat->start(); $wombat->await(); $wombat->stop();
This class implements a Wombat server. It uses server.xml to configure a container hierarchy and provides methods for starting and stopping the server. It is meant to be used in both standalone and embedded mode, so it does not take care of standard daemon things, like processing command line arguments or setting up signal handlers. Those are the responsibilities of the surrounding environment (eg a control script or mod_perl <Perl> section).
Create and return an instance, initializing fields to default values.
Return the location of the configuration file for this Server. Defaults to server.xml in the conf subdirectory of getHome().
getHome()
Set the location of the configuration file for this Server. If the specified location is relative, then it will be absolutized using getHome().
the location of the configuration file relative to the server's home directory
Return the home directory for this Server.
Set the home directory for this Server.
Parameters:
the server home directory, specified absolutely
Throws:
if the specified directory is not specified absolutely
Direct all defined Services to begin listening for requests. Depending on Connector implementations, this method may return immediately (for Connectors that execute asynchrously, eg Apache) or may block (eg Http Connector).
Add a new Service to the set of defined Services.
the Wombat::Core::Service to add
Return an array containing all defined Services.
Remove a Service from the set of defined Services.
the Wombat::Core::Service to remove
Prepare for active use of this component. This method should be called before any of the public methods of the component are utilized.
if the component has already been started
if a problem occurs while parsing a config file
if a validity error is detected in a config file
if an input or output error occurs
Gracefully terminate active use of this component. Once this method has been called, no public methods of the component should be utilized.
if the component is not started
Brian Moseley, bcm@maz.org
To install Wombat, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Wombat
CPAN shell
perl -MCPAN -e shell install Wombat
For more information on module installation, please visit the detailed CPAN module installation guide.