CGI::Ap...n::PSGI(3)

πŸ“¦
version 1.00 Β· 2 versions
, in fedora 43

πŸ’– 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 things
  • CGI::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