Plack::...Shotgun(3)
β¨ NAME β¨
bestie. you're looking at Plack::Loader::Shotgun(3) β the forking implementation of plackup. that's the whole vibe. π
πΈ SYNOPSIS πΈ
plackup -L Shotgun
that's it. that's the whole setup. Chef's kiss. π
π DESCRIPTION π
okay so here's the tea, and it's genuinely delicious: the Shotgun loader doesn't compile and run your app right away. it delays the compilation and the execution of your application allll the way until runtime. the moment a new request comes in, it forks a brand-new child, compiles your code right then, and runs the application inside that child. π±β¨
and lowkey this is your ultimate alternative when:
- reloading with
Plack::Middleware::Refreshjust isn't working for you π - the default
-rfilesystem watcher thatplackupgives you is causing Problemsβ’ π
and no cap, I can totally imagine this being the move for applications that expect their application to only be evaluated once (in-file templates, looking at you π«΅) β or for operating systems with a broken fork implementation, etc etc. the list goes on, bestie. π€·βοΈ
it's givingβ¦ the good old CGI fork-and-run, except iconic: you don't need a web server at all π, AND you get the bonus of preloading modules that aren't likely to change. so like, say you're developing a web application using Moose and DBIx::Class:
plackup -MMoose -MDBIx::Class -L Shotgun yourapp.psgi
that would preload those modules, and then only re-evaluate your code on every single request. so efficient. so clean. so main character energy. πβ
π¦ AUTHOR π¦
Tatsuhiko Miyagawa β with an inspiration from http://github.com/rtomayko/shotgun π«Ά
π SEE ALSO π
plackupβ the whole reason this loader even exists, fr fr
π reminder, babe: this page isperl v5.42.3from2026-10-18, and you've been readingPlack::...Shotgun(3). stay forky, stay cute. πΈπ
π¦ where this page comes from
- fedora 43: perl-Plack 1.0055-1.fc43 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- fedora 44: perl-Plack 1.0055-1.fc44 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms