Re: Replacement for CGI.pm

Discussion in 'Perl Misc' started by Peter Makholm, Oct 22, 2013.

  1. Bernie Cosell <> writes:

    > CGI.pm is very old and I gather that its use is deprecated. Is there a
    > better/newer package for handling the CGI interface between Perl and the
    > web server? We use it both ways: to parse the incoming variables [and
    > cookies] and to generate the outgoing HTML.


    I would replace the non-HTML parts of CGI.pm with Plack.

    Using the CGI handler it is easy to produce CGI scripts and it is easy
    to later "upgrade" to something persistent.

    Using Plack::Request and Plack::Response you get almost the same
    internal features than the request handling parts of CGI.mp. At least
    easy access to request parameters and cookie handling.


    It been years since I have used the HTML-parts of CGI.pm. Most of the
    time I would use a real template system (Template::Toolkit) and write
    the HTML by hand.

    For an API comparable to CGI.pm's HTML interface I think HTML::Tiny can
    be used instead.

    //Makholm
     
    Peter Makholm, Oct 22, 2013
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jürgen Exner

    Re: CGI Perl "use CGI" statement fail

    Jürgen Exner, Jul 31, 2003, in forum: Perl
    Replies:
    0
    Views:
    1,385
    Jürgen Exner
    Jul 31, 2003
  2. Marius Gavrilescu

    Re: Replacement for CGI.pm

    Marius Gavrilescu, Oct 22, 2013, in forum: Perl Misc
    Replies:
    17
    Views:
    490
    Rainer Weikusat
    Jan 23, 2014
  3. Rainer Weikusat

    Re: Replacement for CGI.pm

    Rainer Weikusat, Oct 22, 2013, in forum: Perl Misc
    Replies:
    0
    Views:
    151
    Rainer Weikusat
    Oct 22, 2013
  4. Xho Jingleheimerschmidt

    Re: Replacement for CGI.pm

    Xho Jingleheimerschmidt, Oct 23, 2013, in forum: Perl Misc
    Replies:
    0
    Views:
    133
    Xho Jingleheimerschmidt
    Oct 23, 2013
  5. George Mpouras

    Re: Replacement for CGI.pm

    George Mpouras, Oct 23, 2013, in forum: Perl Misc
    Replies:
    0
    Views:
    134
    George Mpouras
    Oct 23, 2013
Loading...

Share This Page