5 ms·
I was there during the transition. Even rewrote a site from perl to PHP. For newbies, not having have to write the "magic" string, print "Content-Type: text
by mekster 3y ago
I was there during the transition. Even rewrote a site from perl to PHP.
For newbies, not having have to write the "magic" string,
print "Content-Type: text/html\n\n";
before being able to output anything probably felt quite friendlier and being able to mix HTML into the code, though it's not a good practice.
And the PHP standard library has quite a few things built in and combination of MySQL as LAMP was the hot word then, so I guess that's how it got traction and perl was gone from the web development.
I do like the Unix heritage of perl though. It does make you feel like a hacker when it feels the language has the shell syntax half baked in.
- mikelovenotwar 3y agoprint $q->header(); From CGI is better in most cases. Modern web development with perl is lots of fun with Mojolicious: https://mojolicious.org/ https://mojolicious.org/
- arunix 3y agoThe CGI module is no longer shipped with Perl (as of 5.22) https://metacpan.org/pod/CGI::Alternatives https://metacpan.org/pod/CGI::Alternatives
- mikelovenotwar 3y agoAnd nobody starting web dev now with perl should even consider it. Modifying an existing script that otherwise 'just works' sure. In my various other posts here I've recommended Mojolicious.
- knightcrusader 3y agoYou saying nobody starting web dev should use CGI.pm? Or CGI in general? Because CGI itself has its uses even today. It's much easier to understand and get off the ground than something like Mojo or Plack (I've used them all), and has its strengths compared to the others. However, if you are saying no one should use CGI.pm, then I agree. That module is a bloated mess. Much more efficient ways to use CGI without that thing.
- mikelovenotwar 3y agoCGI.pm, it's in response to the CGI::Alternatives post above.
- deleted 3y ago[deleted]