in reply to to use or not to use CGI.pm

There seem to be three questions here

Should I use CGI.pm for generating markup?

This comes down to largely personal preference. I dislike it and tend towards Template-Toolkit instead. On the other hand, it does automatically handle setting of the value attribute to match submitted data (which may or may not be something you want).

Does CGI.pm export the param() subroutine?

Yes, it does

Should I use CGI.pm for processing form parameters?

You should use something. If CGI.pm is too heavy for you, perhaps you might consider CGI::Lite (I've never used it, but haven't heard anything bad about it.). You might also consider using Apache::Request under mod_perl.

Replies are listed 'Best First'.
Re^2: to use or not to use CGI.pm
by bowei_99 (Friar) on Mar 27, 2006 at 07:37 UTC
    Yeah, I'd been sorta looking into Template-Toolkit, too. Seems like that it would be a better fit if you want to read in an HTML template and fill in certain values. My thought is that if you use that, then people maintaining a website using Template-Toolkit wouldn't need to know the CGI.pm syntax or even perl; they would pretty much just have to know perl, and with so many HTML GUI editors like Dreamweaver, BBedit and Microslosh Word, this could make sense. That way, you can hand off more of the mundane day-to-day stuff to someone else, and spend your time reading slashdot or perlmonks. :)

    I've also heard a lot about HTML::Mason as well. That's if you have a large site to manage. I saw a job posting for ebay a while ago, and here are some other sites that use it. I think there are some Oreilly books on them, too.

    -- Burvil