Stevan Little > FCGI-Engine-0.04 > FCGI::Engine::Manager

Download:
FCGI-Engine-0.04.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  0
View Bugs
Report a bug
Module Version: 0.02   Source   Latest Release: FCGI-Engine-0.10

NAME ^

FCGI::Engine::Manager - Manage multiple FCGI::Engine instances

SYNOPSIS ^

  #!/usr/bin/perl

  my $m = FCGI::Engine::Manager->new(
      conf => 'conf/my_app_conf.yml'
  );
  
  $m->start  if $ARGV[0] eq 'start';
  $m->status if $ARGV[0] eq 'status';
  $m->stop   if $ARGV[0] eq 'stop';    

  # on the command line
  
  perl all_my_fcgi_backends.pl start
  perl all_my_fcgi_backends.pl stop
  # etc ...  

DESCRIPTION ^

This module handles multiple FCGI::Engine instances for you, it can start, stop and provide basic status info. It is configurable using Config::Any, but only really the YAML format has been tested.

This module is still in it's early stages, many things may change.

Use with Catalyst

Since FCGI::Engine is pretty much compatible with Catalyst::Engine::FastCGI, this module can also be used to manage your Catalyst::Engine::FastCGI based apps as well as your FCGI::Engine based apps.

EXAMPLE CONFIGURATION ^

Here is an example configuration in YAML, it should be noted that the options for each server are basically the constructor params to FCGI::Engine::Manager::Server and are passed verbatim to it. This means that if you subclass FCGI::Engine::Manager::Server and set the server_class: option appropriately, it should pass any new options you added to your subclass automatically.

  ---
  - name:            "foo.server"
    server_class:    "FCGI::Engine::Manager::Server"
    scriptname:      "t/scripts/foo.pl"
    nproc:            1
    pidfile:         "/tmp/foo.pid"
    socket:          "/tmp/foo.socket" 
    additional_args: [ "-I", "lib/" ]
  - name:       "bar.server"
    scriptname: "t/scripts/bar.pl"
    nproc:       1
    pidfile:    "/tmp/bar.pid"
    socket:     "/tmp/bar.socket"

BUGS ^

All complex software has bugs lurking in it, and this module is no exception. If you find a bug please either email me, or add the bug to cpan-RT.

AUTHOR ^

Stevan Little <stevan@iinteractive.com>

COPYRIGHT AND LICENSE ^

Copyright 2007-2008 by Infinity Interactive, Inc.

http://www.iinteractive.com

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.