3 ms·
>>> The CGI example you mentioned is broken, but is also using a module (CGI.pm) that's been bad and wrong for so long that even Perl, with its eternal love for
by user5994461 7y ago
>>> The CGI example you mentioned is broken, but is also using a module (CGI.pm) that's been bad and wrong for so long that even Perl, with its eternal love for backwards compatibility has removed it from Perl Core.
The CGI example is straight copy/pasted from the official Perl guide, November 2018. https://www.perl.com/article/perl-and-cgi/ https://www.perl.com/article/perl-and-cgi/
- dumbmatter 7y ago...which says > Warning you probably don’t want to use CGI for modern web development, see Why Not to Use CGI.
- user5994461 7y agoIt's just a trivial example to show what the languages look like with variables, loop and print. CGI is not used to deploy web applications anymore, I am aware of that. That's a far leap from saying the module is "broken, bad and wrong". Another commenter pointed out that there are typo in the example so it doesn't work.
- petre 7y agoIt says the Official guide to programming with CGI.pm on the cover. This is just like a book on antique furniture restoration.
- wott 7y ago> The CGI example is straight copy/pasted from the official Perl guide I don't know any official Perl guide? This is a blog post. The illustration image (I gather this is what confused you) is from a 1998 book...
- nrdvana 7y agoIt's also the only example that could possibly make PHP look good, because it's the problem domain PHP was invented for. Nobody is innovating on Perl's CGI so it's not going to make use of any improved language features from the last 20 years.