GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Plack::Middleware::Refresh(3) User Contributed Perl Documentation Plack::Middleware::Refresh(3)

Plack::Middleware::Refresh - Refresh all modules in %INC

  enable "Refresh", cooldown => 3;
  $app;

This is yet another approach to refresh modules in %INC during the development cycle, without the need to have a forking process to watch for filesystem updates. This middleware, in a request time, compares the last refresh time and the current time and if the difference is bigger than cooldown seconds which defaults to 10, call Module::Refresh to reload all Perl modules in %INC if the files have been modified.

Note that this only reloads modules and not other files such as templates.

This middleware is quite similar to what Rack::Reoader does. If you have issues with this reloading technique, for instance when you have in-file templates that needs to be recompiled, or Moose classes that has "make_immutable", take a look at plackup's default -r option or Plack::Loader::Shotgun instead.

Tatsuhiko Miyagawa

Module::Refresh Rack::Reloader
2020-11-30 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.