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