-
-
21 Aug 2012 04:33:25 UTC
- Distribution: Server-Control
- Module version: 0.20
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Repository
- Issues (2)
- Testers (135 / 25 / 0)
- Kwalitee
Bus factor: 0- % Coverage
- License: perl_5
- Activity
24 month- Tools
- Download (37KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- Dependencies
- Apache::ConfigParser
- Capture::Tiny
- File::Slurp
- File::Spec::Functions
- File::Temp
- File::Which
- Getopt::Long
- Hash::MoreUtils
- IO::Socket
- IPC::System::Simple
- List::MoreUtils
- Log::Any::Adapter::Dispatch
- Moose
- MooseX::StrictConstructor
- Pod::Usage
- Proc::ProcessTable
- Time::HiRes
- YAML::Any
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
Server::Control::NetServer -- apachectl style control for Net::Server servers
VERSION
version 0.20
SYNOPSIS
package My::Server; use base qw(Net::Server); sub process_request { #...code... } --- use Server::Control::NetServer; my $ctl = Server::Control::NetServer->new( net_server_class => 'My::Server', net_server_params => { pid_file => '/path/to/server.pid', port => 5678, log_file => '/path/to/file.log' } ); if ( !$ctl->is_running() ) { $ctl->start(...); }
DESCRIPTION
Server::Control::NetServer
is a subclass of Server::Control for Net::Server servers.CONSTRUCTOR
The constructor options are as described in Server::Control, except for:
- net_server_class
-
Required. Specifies a
Net::Server
subclass. Will be loaded if not already. - net_server_params
-
Specifies a hashref of parameters to pass to the server's
run()
method. - pid_file
-
Will be taken from "net_server_params".
- port
-
Will be taken from "net_server_params".
- error_log
-
If not provided, will attempt to get from
log_file
key in "net_server_params".
SEE ALSO
COPYRIGHT AND LICENSE
This software is copyright (c) 2011 by Jonathan Swartz.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
Module Install Instructions
To install Server::Control, copy and paste the appropriate command in to your terminal.
cpanm Server::Control
perl -MCPAN -e shell install Server::Control
For more information on module installation, please visit the detailed CPAN module installation guide.