I asked a separate question about Python here, and was told that "classic CGI isn't the best way to use anything at all. With classic CGI server has to spawn a new process for every request"
Now I am working on a Perl-based website using Apache, and all my scripts start with:
use CGI;
Is this a problem? Is there a newer or better way to build a Perl-based website?
Write your website using Plack or a framework built on top of Plack (such as Catalyst or Dancer/Dancer2).
You then have several options to deploy the website. You can deploy it as a CGI script (easy to do, but inefficient), or using FastCGI or Apache's mod_perl, or forget Apache altogether and use a standalone Perl web server such as Starman. Yet another option is uWSGI which is conceptually similar to FastCGI.
Apache's mod_proxy allows you to take a hybrid approach for deployment. Your website could be running on Apache, which could forward requests for particular URLs through to Starman.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With