Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Re: CGI.pm for HTML output?

by theguvnor (Chaplain)
on Mar 09, 2002 at 04:20 UTC ( [id://150501]=note: print w/replies, xml ) Need Help??


in reply to Re: CGI.pm for HTML output?
in thread CGI.pm for HTML output?

Trying... to... resist... jumping into... the fray. (Too late).

I would definitely not use the CGI methods of generating HTML for the entire page/site, for the reasons tilly and others give. But I do think that there is one place where CGI.pm's HTML generation functions shine: any kind of input form.

My rationale? CGI.pm form fields are "sticky". This means that if you have to print out the form a second time (e.g. to have a user correct some invalid input), it is reincarnated with all the input from the first pass. Automatically. So you don't have to regenerate the form worrying about substituting any default form values with the valid input from the first submission, CGI.pm takes care of that. And it's easy to delete any form params that happen to be invalid for your program.

This is just my opinion, and others will surely disagree, but I find the HTML generation method invaluable for this reason.

..Guv

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://150501]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2024-03-29 02:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found