1Plack::Loader::Shotgun(U3s)er Contributed Perl DocumentatPiloanck::Loader::Shotgun(3)
2
3
4
6 Plack::Loader::Shotgun - forking implementation of plackup
7
9 plackup -L Shotgun
10
12 Shotgun loader delays the compilation and execution of your application
13 until the runtime. When a new request comes in, this forks a new child,
14 compiles your code and runs the application.
15
16 This should be an ultimate alternative solution when reloading with
17 Plack::Middleware::Refresh doesn't work, or plackup's default "-r"
18 filesystem watcher causes problems. I can imagine this is useful for
19 applications which expects their application is only evaluated once
20 (like in-file templates) or on operating systems with broken fork
21 implementation, etc.
22
23 This is much like good old CGI's fork and run but you don't need a web
24 server, and there's a benefit of preloading modules that are not likely
25 to change. For instance if you develop a web application using Moose
26 and DBIx::Class,
27
28 plackup -MMoose -MDBIx::Class -L Shotgun yourapp.psgi
29
30 would preload those modules and only re-evaluates your code in every
31 request.
32
34 Tatsuhiko Miyagawa with an inspiration from
35 <http://github.com/rtomayko/shotgun>
36
38 plackup
39
40
41
42perl v5.36.0 2022-09-12 Plack::Loader::Shotgun(3)