Plack::Loader(3)

πŸ’– Plack::Loader πŸ’–

okay bestie, so this is Plack::Loader β€” the (auto)load Plack Servers girlie of the User Contributed Perl Documentation squad. she's your factory bestie who picks the right server backend for you. no cap.


✨ NAME ✨

Plack::Loader β€” (auto)load Plack Servers πŸŽ€


🌸 SYNOPSIS 🌸

# auto-select server backends based on env vars
use Plack::Loader;
Plack::Loader->auto(%args)->run($app);

# specify the implementation with a name
Plack::Loader->load('FCGI', %args)->run($app);

πŸ¦‹ DESCRIPTION πŸ¦‹

so like… Plack::Loader is a factory class whose whole job is loading one of the Plack::Handler subclasses based on the environment. that's it, that's the gig. she reads the vibe check of your env and hands you the right handler. iconic behavior tbh πŸ’…


πŸ‘‘ AUTOLOADING πŸ‘‘

Plack::Loader->auto(%args) will autoload the most correct server implementation by guessing from environment variables and Perl INC hashes. she's literally out here sleuthing for you πŸ”βœ¨


πŸ’œ PLACK_SERVER

env PLACK_SERVER=AnyEvent ...

Plack users can specify the specific implementation they want to load using the PLACK_SERVER environment variable. just tell her which one you want and she delivers, periodt. 🫢


πŸ“ PHP_FCGI_CHILDREN, GATEWAY_INTERFACE

If there's one of FastCGI or CGI specific environment variables set, use the corresponding server implementation. she sees the FastCGI/CGI vibes and she's like "say less" πŸ’€


🌈 %INC

If one of AnyEvent, Coro or POE is loaded, the relevant server implementation such as Twiggy, Corona or POE::Component::Server::PSGI will be loaded, if they're available. like she checks if your besties are in the group chat first β€” %INC tells her who's online 🧚


ngl bestie, the whole thing is just: guess the environment, pick the matching server backend, no drama. main character energy fr fr ⭐

and that's the page!! πŸŽ€ written by the Perl crew, documented with perl v5.42.3, dated 2026-10-18, and filed under Plack::Loader(3) β€” mwah, slay, bye bestie πŸ’–βœ¨πŸŒΈ

πŸ“¦ where this page comes from