1Plack::Middleware::RefrUessehr(3C)ontributed Perl DocumePnltaactki:o:nMiddleware::Refresh(3)
2
3
4
6 Plack::Middleware::Refresh - Refresh all modules in %INC
7
9 enable "Refresh", cooldown => 3;
10 $app;
11
13 This is yet another approach to refresh modules in %INC during the
14 development cycle, without the need to have a forking process to watch
15 for filesystem updates. This middleware, in a request time, compares
16 the last refresh time and the current time and if the difference is
17 bigger than cooldown seconds which defaults to 10, call Module::Refresh
18 to reload all Perl modules in %INC if the files have been modified.
19
20 Note that this only reloads modules and not other files such as
21 templates.
22
23 This middleware is quite similar to what Rack::Reoader does. If you
24 have issues with this reloading technique, for instance when you have
25 in-file templates that needs to be recompiled, or Moose classes that
26 has "make_immutable", take a look at plackup's default -r option or
27 Plack::Loader::Shotgun instead.
28
30 Tatsuhiko Miyagawa
31
33 Module::Refresh Rack::Reloader
34
35
36
37perl v5.30.1 2020-01-30 Plack::Middleware::Refresh(3)