develooper Front page | perl.perl5.porters | Postings from May 2013

Re: CGI.pm is dead, long live CGI.pm

Thread Previous | Thread Next
From:
Xiao Yafeng
Date:
May 28, 2013 07:56
Subject:
Re: CGI.pm is dead, long live CGI.pm
Message ID:
CABPUXgD5PPqyxcfgmEQ0nUxD+rfKVWn9HSAH3K6KMtcBuAzi3w@mail.gmail.com
On Tue, May 28, 2013 at 3:35 PM, Johan Vromans <jvromans@squirrel.nl> wrote:

> Aristotle Pagaltzis <pagaltzis@gmx.de> writes:
>
> > • CGI is not the same as CGI.pm. You don’t have to be using CGI.pm if
> > you are doing CGI – many of us have done it with nothing in the past,
> > or you can use something else than CGI.pm to do CGI.
>
> Yes.
>
> > • CGI is not the only deployment option and indeed if you are running
> > a web app rather than adding a guestbook or some such into a mostly
> > static web site, then it’s certainly not the best one. But it remains
> > *a* deployment option that can sometimes be easier than others.
>
> Yes.
>
> > In both of these senses, Plack has you covered.
>
> Plack is an excellent framework for writing web applications. But if you
> want something quick and easy (your guestbook suggestion is a good
> example) it's overkill.
>
> >> If I'd want a trivial web app that shows me yesterday's SinFest comic,
> >> I'd use CGI.pm and 10-20 lines of Perl code. It would work on every
> >> web host that has Perl. What would be your approach?
> >
> > You can write a script using Plack that you can then deploy as a CGI –
> > as one among any number of deployment options.
>
> My 10-20 lines of Perl code will work on every web host that has Perl.
>
> Your Plack solution requires install of a huge collection of modules,
> including a lot of XS modules. The last time I tried to install Plack
> and Task::Plack (Fedora 17, with pristine 5.16.3) it bailed out after
> having installed some 90 modules.
>
> I'm sure I could make it going, but this does not classify as a
> something quick and easy.
>
> > It’s all so, so, so much better and cleaner and saner than CGI.pm ever
> > could be. Why would we be so cruel as to foist that relic on any
> > newbie?
>
> Because it works?
>
> Remember, we all program Perl but occasionally a simple shell script
> will do the job.
>
> -- Johan
>
I could also be done it with 10~20 lines with mojolicious::lite.
So I think,
The point is not about how short the script to write  or how easy the
script is to deploy.
The point is CGI.pm is just a module for CGI. I want to choose the module I
prefer  when I need program in some spcail area other than  someone put it
into core.
In history, perl is used for CGI. but nowadays, it is a gernearl language.
So I hope to see it ship with modules for gerneal purpose, not just web.

Best Regards,
Andy

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About