Discussion:
[htmltmpl] does this replace CGI module?
Rajeev Prasad
2011-07-03 21:52:05 UTC
Permalink
Hello,

I am new to perl CGI, with so many options, i am confused. does modules
like tt, html::template, mason etc. replace CGI module in perl CGI
scripting? Can someone guide please? is CGI module the only one which
can parse the values coming from FORM input fields?

thank you.
Rajeev
Mark F
2011-07-03 22:24:31 UTC
Permalink
I am new to perl CGI, with so many options, i am confused. does modules like
tt, html::template, mason etc. replace CGI module in perl CGI scripting? Can
someone guide please? is CGI module the only one which can parse the values
coming from FORM input fields?
H::T replaces some of the CGI module. The part which emits HTML.
That's the benefit of templating. It isolates the HTML for easier
maintenance. The CGI module would still be used to obtain post
variables, etc.

I use CGI::Simple because it doesn't have all the HTML fluff which the
CGI module has. I've read it's more efficient due to its smaller size.
But, for me it's just principle. I never liked CGI's conflation of CGI
and HTML behavior.
Rajeev Prasad
2011-07-04 03:24:55 UTC
Permalink
Thx. Mark,

do you think i can use HTML::FormHandler for handling forms/validating data etc. and HTML::template for displaying results?

and will this be suffice for a small project? currently i am not using any database to store my data files, (i think formhandler needs database backend). in that case i will use your suggestion of cgi::simple.

rgds,
Rajev



________________________________
From: Mark F <***@gmail.com>
To: "html-template-***@lists.sourceforge.net" <html-template-***@lists.sourceforge.net>
Sent: Sunday, July 3, 2011 5:24 PM
Subject: Re: [htmltmpl] does this replace CGI module?
I am new to perl CGI, with so many options, i am confused. does modules like
tt, html::template, mason etc. replace CGI module in perl CGI scripting? Can
someone guide please? is CGI module the only one which can parse the values
coming from FORM input fields?
H::T replaces some of the CGI module. The part which emits HTML.
That's the benefit of templating. It isolates the HTML for easier
maintenance. The CGI module would still be used to obtain post
variables, etc.

I use CGI::Simple because it doesn't have all the HTML fluff which the
CGI module has. I've read it's more efficient due to its smaller size.
But, for me it's just principle. I never liked CGI's conflation of CGI
and HTML behavior.

Loading...