in reply to Re: Use Strict & subs
in thread Use Strict & subs

Just a little comment.
i'd be careful using CGI, this module is a real good hack, but BIG (using 3,5 mb of your memory when compiled).
Next, i don't really like the idea of using the html stuff CGI offers, i like my perl code to be perl, not html. You might Have a look at HTML::Template, or try the Tal implementation for perl: Petal.
I don't want to create a flame about CGI versus other methods (like Apache::Request), but i'd like to inform about the possibilities, since CGI might not be the best solution for some problems.

hmm updated since last comment:
I'd use either the module HTML::Template or Pental (the Plone template system) to conform more to the Model-View-Controller patterns, and use templates and these modules to generate the html-content in stead of CGI

Next i'd use the Apache::Request implementation to read any requests, it has the same interface as CGI, but is light and fast in use.
More information can be found on http://www.cpan.org and www.plone.org.

Replies are listed 'Best First'.
Re^3: Use Strict & subs
by dragonchild (Archbishop) on Dec 30, 2004 at 13:41 UTC
    While technically true, your comment would be better suited if you explained further why someone should use HTML::Template instead of CGI. Furthermore, what is a "Tal" implementation?

    For the record, I know what those things are. But, you're giving an answer to someone who doesn't seem to have a lot of domain experience in the web applications world. You need to explain what you're talking about and why someone should make a radical paradigm shift.

    Being right, does not endow the right to be rude; politeness costs nothing.
    Being unknowing, is not the same as being stupid.
    Expressing a contrary opinion, whether to the individual or the group, is more often a sign of deeper thought than of cantankerous belligerence.
    Do not mistake your goals as the only goals; your opinion as the only opinion; your confidence as correctness. Saying you know better is not the same as explaining you know better.

Re^3: Use Strict & subs
by davorg (Chancellor) on Jan 02, 2005 at 16:48 UTC
    i'd be careful using CGI, this module is a real good hack, but BIG (using 3,5 mb of your memory when compiled).

    It's worth pointing out that whilst it's true that CGI.pm contains a lot code, it also implements a pretty ingenious code loader that it only actually compiles the code that you use. So you shouldn't really worry about loading code that you aren't going to use - CGI.pm is actually pretty efficient.

    --
    <http://www.dave.org.uk>

    "The first rule of Perl club is you do not talk about Perl club."
    -- Chip Salzenberg