App-Context
view release on metacpan or search on metacpan
lib/App/Context/NetServer.pm view on Meta::CPAN
#############################################################################
## $Id: NetServer.pm 6004 2006-05-02 13:52:30Z spadkins $
#############################################################################
package App::Context::NetServer;
$VERSION = (q$Revision: 6004 $ =~ /(\d[\d\.]*)/)[0]; # VERSION numbers generated by svn
use App;
use App::Context;
use Net::Server;
@ISA = ( "Net::Server", "App::Context" );
use App::UserAgent;
use strict;
=head1 NAME
App::Context::NetServer - context in which we are currently running
=head1 SYNOPSIS
# ... official way to get a Context object ...
use App;
$context = App->context();
$config = $context->config(); # get the configuration
$config->dispatch_events(); # dispatch events
# ... alternative way (used internally) ...
use App::Context::NetServer;
$context = App::Context::NetServer->new();
=cut
#############################################################################
# DESCRIPTION
#############################################################################
=head1 DESCRIPTION
A Context class models the environment (aka "context)
in which the current execution thread is running.
For the App::Context::NetServer class, this is the runtime environment
of a server with any of the following Net::Server personalities.
* Net::Server - generic, single-connection server
* Net::Server::INET - a server controlled by inetd
* Net::Server::Fork - a forking server
* Net::Server::PreForkSimple - a prefork server with constant # children
* Net::Server::PreFork - a prefork server with varying # children
=cut
#############################################################################
# PROTECTED METHODS
#############################################################################
=head1 Protected Methods:
The following methods are intended to be called by subclasses of the
current class.
=cut
#############################################################################
# _init()
#############################################################################
=head2 _init()
The _init() method is called from within the standard Context constructor.
The _init() method sets debug flags.
* Signature: $context->_init($args)
* Param: $args hash{string} [in]
* Return: void
* Throws: App::Exception
* Since: 0.01
Sample Usage:
$context->_init($args);
=cut
sub _init {
my ($self, $args) = @_;
$args = {} if (!defined $args);
}
#############################################################################
# PROTECTED METHODS
#############################################################################
=head1 Protected Methods
These methods are considered protected because no class is ever supposed
to call them. They may however be called by the context-specific drivers.
=cut
( run in 0.406 second using v1.01-cache-2.11-cpan-df04353d9ac )