Catalyst::Restarter - Uses File::ChangeNotify to check for changed files and restart the server
my $restarter = Catalyst::Restarter->new( directories => '/path/to/MyApp', regex => '\.yml$|\.yaml$|\.conf|\.pm$', start_sub => sub { ... } ); $restarter->run_and_watch;
This class uses File::ChangeNotify to watch one or more directories of files and restart the Catalyst server when any of those files changes.
This method creates a new restarter object.
The "start_sub" argument is required. This is a subroutine reference that can be used to start the Catalyst server.
This method forks, starts the server in a child process, and then watched for changed files in the parent. When files change, it kills the child, forks again, and starts a new server.
Catalyst, <File::ChangeNotify>
Catalyst Contributors, see Catalyst.pm
This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself.
To install Catalyst::Devel, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Catalyst::Devel
CPAN shell
perl -MCPAN -e shell install Catalyst::Devel
For more information on module installation, please visit the detailed CPAN module installation guide.