in reply to Is CGI.pm dead?

Here's your simple example implemented using Mojolicious:

#!perl use Mojolicious::Lite; any '/route_name' => sub { my ( $self ) = @_; $self->render( json => whatever( $self->req->json ) ); }; sub whatever { my ( $request ) = @_; ... } app->start;

Benefits out of the box: strict and warnings enabled by default, doesn't need a third party webserver in front of it, is persistent (will be 100+ times faster than your CGI script - oh "mod_perl" you say? I thought we were all done?), is utf-8 safe, is cleaner, is easier to test, is none blocking, etc, etc, etc.

Saying CGI.pm is simple and that by just writing the code you're all done is to forget the amount of faff required in actually running a cgi script, and then even more faff if you want to do anything slightly more complex and scalable with it.

FWIW CGI.pm is not dead, but i am not accepting any more feature requests for the module, and will not be doing any maintenance except critical bug fixes. Essentially it is "done".

Replies are listed 'Best First'.
Re^2: Is CGI.pm dead?
by Anonymous Monk on May 28, 2015 at 14:29 UTC
    Essentially it is "done".

    So no CGI v5? Well, I guess the advocates of backward compatibility will be happier. But in any case thank you for taking care of a module that will probably stay with us for a while longer :-)

    BTW, perhaps better terms would be "mature" or even "legacy"...

      Nope, no v5. I'm just about to drop a release on CPAN that basically says "game over" for all but critical issues.
        s/game over/i'm out/