CGI::Ap...n::PSGI(3)
π CGI::Application::PSGI β the manual, but make it cute π
okay bestie, so this is the manpage for CGI::Application::PSGI (yeah the header abbreviates it as CGI::Ap...n::PSGI(3) because terminals are dramatic like that, but the full name is the whole vibe). It lives in the User Contributed Perl Documentation section of the manual, and it's genuinely so useful. Let's get into it. π«Ά
β¨ NAME β¨
CGI::Application::PSGI β a PSGI Adapter for CGI::Application. that's it, that's the whole job. it's the little bridge that lets your CGI::Application app live its PSGI fantasy. π
πΈ SYNOPSIS πΈ
okay so here's the whole setup, and listen β the way this is so easy? iconic. no cap.
### In WebApp.pm
package WebApp;
use base qw(CGI::Application);
# Nothing needs to be changed
### app.psgi
use CGI::Application::PSGI;
use WebApp;
my $handler = sub {
my $env = shift;
my $app = WebApp->new({ QUERY => CGI::PSGI->new($env) });
CGI::Application::PSGI->run($app);
};
the big slay here? in your WebApp.pm β nothing needs to be changed. literally nothing. your existing app stays exactly as it is. you just write an app.psgi, use both modules, and build a $handler sub that grabs $env, makes a WebApp with QUERY set to CGI::PSGI->new($env), and hands the whole thing to CGI::Application::PSGI->run($app). that's the entire ritual. π§β¨
π¦ DESCRIPTION π¦
CGI::Application::PSGI is a runner β its whole purpose is to run a CGI::Application application as a PSGI application. so instead of your app being all CGI-flavoured, it gets to run in PSGI land. main character energy, honestly. π
π AUTHOR π
Tatsuhiko Miyagawa <miyagawa@bulknews.net> β thank you for your service, legend. π«‘π
π LICENSE π
this library is free software bestie π β you can redistribute it and/or modify it under the same terms as Perl itself. so go off, just keep it under those same terms, periodt.
β SEE ALSO β
CGI::PSGIβ the vibe check on the PSGI side of thingsCGI::Application::PSGIβ yes it's listing itself, we love a self-referential queen π
okay so real talk: this page is from the User Contributed Perl Documentation, generated for perl v5.42.0 and dated 2025-07-25. that's the source, version, and date, wrapped up in a little bow for you π β now go run your PSGI app, bestie, you're gonna ate it fr fr π₯π¦
π¦ where this page comes from
- fedora 43: perl-CGI-Application-PSGI 1.00-45.fc43 Β· 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