Plack is a set of tools for using the PSGI stack.
It contains middleware components,
a reference server and utilities for Web application frameworks.
Plack is like Ruby's Rack or Python's Paste for WSGI.

See PSGI for the PSGI specification and PSGI::FAQ to know what PSGI and Plack are and why we need them.

A PSGI application is a code reference but it's not easy to pass code reference via the command line or configuration files,
so Plack uses a convention that you need a file named app.psgi or similar,
which would be loaded (via perl's core function do) to return the PSGI application code reference.

plackup is a command line launcher to run PSGI applications from command line using Plack::Loader to load PSGI backends. It can be used to run standalone servers and FastCGI daemon processes. Other server backends like Apache2 needs a separate configuration but .psgi application file can still be the same.

If you want to write your own frontend that replaces, or adds functionalities to plackup, take a look at the Plack::Runner module.

PSGI middleware is a PSGI application that wraps an existing PSGI application and plays both side of application and servers. From the servers the wrapped code reference still looks like and behaves exactly the same as PSGI applications.

Modules added to the Plack:: sub-namespaces should be reasonably generic components which are useful as building blocks and not just simply using Plack.

Middleware authors are free to use the Plack::Middleware:: namespace for their middleware components. Middleware must be written in the pipeline style such that they can chained together with other middleware components. The Plack::Middleware:: modules in the core distribution are good examples of such modules. It is recommended that you inherit from Plack::Middleware for these types of modules.

Not all middleware components are wrappers, but instead are more like endpoints in a middleware chain. These types of components should use the Plack::App:: namespace. Again, look in the core modules to see excellent examples of these (Plack::App::File, Plack::App::Directory, etc.). It is recommended that you inherit from Plack::Component for these types of modules.

DO NOT USE Plack:: namespace to build a new web application or a framework. It's like naming your application under CGI:: namespace if it's supposed to run on CGI and that is a really bad choice and would confuse people badly.