5 ms·
CGI is not the way to go today. If you want to build web pages with Perl, check out http://mojolicio.us http://mojolicio.us
by mxey 13y ago
CGI is not the way to go today. If you want to build web pages with Perl, check out http://mojolicio.us http://mojolicio.us
- rikacomet 13y agoMight I ask, in a nutshell.. why not CGI?
- untothebreach 13y ago(classic) CGI requires a full application start-up every time a request comes in, and so is very slow. If you have to use CGI, use FCGI (fast cgi) to solve that problem. However, in recent years PSGI has started to become the standand in the community. As far as I know, it is modeled after Python's WSGI. All of the "major" perl web frameworks support it, the three big ones I can think of are Mojolicious[1], Dancer[2], and Catalyst[3]. 1: https://metacpan.org/pod/Mojolicious https://metacpan.org/pod/Mojolicious 2: https://metacpan.org/pod/Dancer https://metacpan.org/pod/Dancer 3: https://metacpan.org/pod/catalyst https://metacpan.org/pod/catalyst
- rikacomet 13y agoI will look into these, thanks! I knew about FCGI, but didn't knew about PSGI. Much appreciated.
- untothebreach 13y agoI probably should have included this link too: the PSGI spec itself (https://metacpan.org/pod/release/MIYAGAWA/PSGI-1.102/PSGI.pod https://metacpan.org/pod/release/MIYAGAWA/PSGI-1.102/PSGI.po...)
- arc_of_descent 13y agoCGI::Application too supports PSGI via CGI::Application::PSGI. I prefer CGI::Application as it is minimalist and very customizable.
- artiom 13y agoThere is Dancer2 as well https://metacpan.org/pod/Dancer2 https://metacpan.org/pod/Dancer2
- AugieDB 13y agoDancer2 is also great for creating a web service, of sorts. Need something to send out JSON chunks with a URL front-end? Very simple to set up and get going. I've been translating some code I wrote for web pages into little engines for Dancer2 to run for other groups inside the company to extract information out for their own applications. It's perfect for that.
- liveoneggs 13y agoyou can deploy mojolicious as cgi. :) It's really nice, though. Try out Mojolicious::Lite asap!
- petit_robert 13y agoThere is a learning curve, but I am fond of mod_perl because you can do almost anything with it. It's also very fast. http://perl.apache.org/docs/index.html http://perl.apache.org/docs/index.html You can wrap your existing CGI scripts in it using http://perl.apache.org/docs/2.0/api/ModPerl/Registry.html http://perl.apache.org/docs/2.0/api/ModPerl/Registry.html so the transition can be rather smooth
- __david__ 13y agoDepends on what you are doing and how much traffic you have and what web server you're sitting behind. For example: emacsformacosx.com was straight Perl CGI until about 2 weeks ago.