|Think about Loose Coupling|
CGI.pm vs. CGI modulesby rruiz (Monk)
|on Oct 17, 2002 at 05:20 UTC||Need Help??|
rruiz has asked for the
wisdom of the Perl Monks concerning the following question:
Hello there, God bless you.
I am sorry if this has been asked many times before, but the most recent reference I could find in this site is the node Has there been a new CGI..., which is dated Feb, 21 2001. Althrought, it is not the closets related to what I am talking about here, it is close enought (I think... mmm...)
What I want to know/ask is: What is the best way to go about CGI programming: using CGI.pm or the CGI modules to program a CGI's in Perl? What do you think is going to last the most?
Before researching into this matter, I thought that CGI modules was faster than CGI.pm programming (CGI:Base and related vs CGI), but reading the documentation on CGI::Form, it says it is slower to boot than CGI.pm related stuff because of the flexibility innherent to it.
So, the question is: Should I stay with CGI.pm or should I go for CGI::Base and related modules?
I have seen that almost everyone here is using CGI.pm, but reading the documentation for CGI::Base and related modules, I can read that using CGI::Base + HTML.pm + URI::Escape.pm is equivalent to using CGI.pm. And taken into account that, as far as I can tell, it is best for a piece of software to do the least amount of work, and cooperate with other pieces of software to do the work... I want to know/ask here: What do you think is the best way to do CGI development in Perl: Using the CGI.pm module or using the CGI::Base (and HTML, and HTTP and URI, and etc.) related modules?
As far as I can see, there have been quite a few questions about separating HTML generation from CGI processing lately, that's why I think this is a good question to ask for.
Hope this make some sense to you and you can help me decide what is the best way to go about developing CGI's in Perl. Thanks in advance for the thoughts you can bring into this matter for me.
ps. Sorry for my English if it is not good enought. :)