Plack::...irectory(3)
β¨ Plack::App::Directory β¨
okay bestie, gather round, because this one is literally the blueprint π
Plack::App::Directory β it serves static files from a document root and does a directory index. that's it. that's the whole vibe. π
πΈ SYNOPSIS πΈ
like this, bestie:
# app.psgi
use Plack::App::Directory;
my $app = Plack::App::Directory->new({ root => "/path/to/htdocs" })->to_app;
and that's a whole working app. no cap. π¦
π DESCRIPTION π
okay so picture this: it's a static file server PSGI application, right? but it's also giving directory index β a la Apache's mod_autoindex. so when someone hits a directory, they get a listing instead of a sad little 404. the range. the versatility. we love to see it. π
π CONFIGURATION π
rootβ this is your document root directory, the main character of your file-serving journey π«Ά. and if you don't set it? it just defaults to the current directory</> π. lowkey convenient, highkey chaotic, choose your own adventure bestie.
π AUTHOR π
Tatsuhiko Miyagawa β an icon, a legend, and honestly? they ate. π β¨
π¦ SEE ALSO π¦
Plack::App::Fileβ the sibling, the companion, the other half of the duo π
and that's the whole page bestie, no filler, all facts π§
this little cutie came to you courtesy of perl v5.42.3, dated 2026-10-18, living in the User Contributed Perl Documentation section of the manual. periodt. πβ
π¦ 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