Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi I'm building my website with CGI.pm without using frameworks like Catalyst.
Don't tell me to use framework because It's been almost 1 year since I made this. it's too late.
I just wonder there are alternatives to CGI.pm
because I'm not using html generation functions from CGI.pm
What I only need are:

$cgi->header(-cookie => [$q->cookie(-name => 'sid', -value => $sid)]); + for cookies $cgi->param('parameter'); for form processing

Replies are listed 'Best First'.
Re: lighter alternatives to CGI.pm
by dsheroh (Monsignor) on Apr 26, 2015 at 07:53 UTC
    I haven't used them, so I can't say how close either is to being a drop-in replacement for CGI.pm, but you can take a look at CGI::Lite/CGI::Lite::Request.
Re: lighter alternatives to CGI.pm ( CGI::Alternatives )
by Anonymous Monk on Apr 26, 2015 at 09:25 UTC

    because I'm not using html generation functions from CGI.pm

    Great, edit CGI.pm and delete them :)

    Oh wait, thats called CGI::Simple but its not quite as up to date as CGI.pm

    Hmm CGI::Alternatives not so much help for you

    CGI.pm is about as light as it gets, even with all that html stuff you're not using ...

    just because you're using CGI.pm doesn't mean you're limited to a non persistent environment like cgi/cgi-bin, you can easily go persistent with CGI::Emulate::PSGI if your code follows the best practices of scoping as per CGI to mod_perl Porting. mod_perl Coding guidelines