1Catalyst::Restarter(3)User Contributed Perl DocumentationCatalyst::Restarter(3)
2
3
4

NAME

6       Catalyst::Restarter - Uses File::ChangeNotify to check for changed
7       files and restart the server
8

SYNOPSIS

10           my $class = Catalyst::Restarter->pick_subclass;
11
12           my $restarter = $class->new(
13               directories => '/path/to/MyApp',
14               regex       => '\.yml$|\.yaml$|\.conf|\.pm$',
15               start_sub => sub { ... }
16           );
17
18           $restarter->run_and_watch;
19

DESCRIPTION

21       This is the base class for all restarters, and it also provide
22       functionality for picking an appropriate restarter subclass for a given
23       platform.
24
25       This class uses File::ChangeNotify to watch one or more directories of
26       files and restart the Catalyst server when any of those files changes.
27

METHODS

29   pick_subclass
30       Returns the name of an appropriate subclass for the given platform.
31
32   new ( start_sub => sub { ... }, ... )
33       This method creates a new restarter object, but should be called on a
34       subclass, not this class.
35
36       The "start_sub" argument is required. This is a subroutine reference
37       that can be used to start the Catalyst server.
38
39   run_and_watch
40       This method forks, starts the server in a child process, and then
41       watched for changed files in the parent. When files change, it kills
42       the child, forks again, and starts a new server.
43

SEE ALSO

45       Catalyst, File::ChangeNotify
46

AUTHORS

48       Catalyst Contributors, see Catalyst.pm
49
51       This program is free software, you can redistribute it and/or modify it
52       under the same terms as Perl itself.
53
54
55
56perl v5.34.0                      2021-07-22            Catalyst::Restarter(3)
Impressum