in reply to Re^10: Making Perl Monks a better place for newbies (and others)
in thread Making Perl Monks a better place for newbies (and others)
I never did like CGI.pm.
I never did understand the negativity around CGI.pm. It's very easy to use and gets the job done. When projects needed to scale people would simply preload CGI.pm into memory and port their scripts to persistent mod_perl handlers. CGI was the most celebrated Perl module for many years and almost single-handedly propelled Perl to be the main programming language for building web infrastructure. Almost, because, before CGI.pm there were years of productivity enabled by something called cgi-lib.pl: https://cgi-lib.berkeley.edu/
Of course when CGI.pm came along it was encouraged and the previously popular way of getting the job done right was discouraged.
I know what is wrong with CGI.pm, and I also know what is right, but I don't understand throwing out the baby with the bathwater, when the baby was laying golden eggs (all those web frameworks sitting on CPAN, built by people who started on core CGI).
Before CGI.pm a perl web application looked like this:
After CGI.pm got all object-oriented it went like:print "Content-type: text/html\n\n";
After CGI.pm fell out of favor this is a preferred method:use CGI; my $q = CGI->new; print $q->header;
Clearly things have gotten more abstract and less intuitive...use Mojolicious::Lite; get '/' => sub { my $c = shift; $c->render(text => '') }; app->start;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^12: Making Perl Monks a better place for newbies (and others)
by marto (Cardinal) on Feb 03, 2020 at 18:47 UTC | |
|
Re^12: Making Perl Monks a better place for newbies (and others)
by Your Mother (Archbishop) on Feb 03, 2020 at 18:52 UTC | |
| A reply falls below the community's threshold of quality. You may see it by logging in. |