* Adam Turoff ([EMAIL PROTECTED]) [26 Sep 2000 16:44]:
> On Mon, Sep 25, 2000 at 09:34:41PM -0700, Nathan Wiger wrote:
> > Adam Turoff wrote:
[...]
> > If it imports a function, then it's a module. Perhaps what we should
> > look at doing is providing a lightweight CGI module instead? 

Is there much point having a lightweight CGI module? If you say 'I want
it to load quickly', I say 'get mod_perl'.

[...]
> I do like the idea of stacking HTTP headers and queueing them up
> before the first print statement, where that print is a little more
> magical than every subsequent print.  I'd imagine that if the HTTP
> headers were blank, it would Do The Right Thing (tm) and emit a
> "Content-type: text/html\n\n", before replacing itself with the
> standard print builtin.

This would be useful. I'd be more inclined to have it with the CGI
module though. But then, it would need to be an option since sometimes
programs use CGI bits and pieces but don't run in a CGI context (such
as mod_perl scripts, and the odd script I have for generating
semi-static documents).

[...]
> > I think we should provide robust input parsing, but just general
> > purpose output formatting tools.

> Robust input parsing: yes.

> General purpose output formatting: no, nyet, nein, non, "over my dead
> body".

> Rudimentary HTTP header emission: probably.

I think it all belongs in the CGI module really. Having it in the core
just makes it a bugger to change in future, and the speed gains would
probably only be minimal (particularly if you're a mod_perl user).

The assorted Apache modules (and HTML::Embperl and similar) and the CGI
module really do provide proper facilities for CGI operations. Having
"rudimentary" features in the core would be duplication and hence a
waste. I realise TMTOWTDI is a good thing, but surely that only really
applies if all methods are Good?

I can see a use for having all the query values in a %CGI or similar
hash (like %IN in the old cgi-lib.pl library), but that would be better
of being placed in the CGI module, methinks (and probably is in there
anyway --- I've not looked at the shiny new v.3 CGI module as of yet).


cheers,
-- 
iain truskett, aka Koschei.                    <http://eh.org/~koschei/>
You know you are addicted to coffee if...
    11  You can jump-start your car without cables.

Reply via email to