FCGI::Restarter - Restart FCGI process on the fly
use FCGI::Restarter; my $Reloader = FCGI::Restarter->new(); $Reloader->set_script($0); $Reloader->set_watch_file( [ $0, # Look for modification of self $INC{ "Web/MyModule.pm"}, # Look for chaneg of some module "my config path", # Look for changes in config ] ); while( $Reloader->new_request()) { # Instead of (FCGI::accept() >= 0) my $q = CGI->new; # process request }
FCGI::Restarter provide same functionality as FCGI plus it restart self if watch files changed in time. This additional function especially usefull in development enviroment.
None by default.
This module expected to work in UNIX like enviroment
L<FCGI>
Grishaev Anatoliy, <grian@cpan.org>
Copyright (C) 2011 by Grishaev Anatoliy
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.14.1 or, at your option, any later version of Perl 5 you may have available.
To install FCGI::Restarter, copy and paste the appropriate command in to your terminal.
cpanm
cpanm FCGI::Restarter
CPAN shell
perl -MCPAN -e shell install FCGI::Restarter
For more information on module installation, please visit the detailed CPAN module installation guide.