On Tue, 26 Sep 2000, iain truskett wrote:

> * Adam Turoff ([EMAIL PROTECTED]) [26 Sep 2000 17:15]:
> > On Tue, Sep 26, 2000 at 05:02:02PM +1100, iain truskett wrote:
> > > Is there much point having a lightweight CGI module? If you say 'I want
> > > it to load quickly', I say 'get mod_perl'.

Agreed. The bottleneck in standard CGI is not parsing the query string
or form post, it is the fork.
 
> > There's more to it than just loading quickly.  It should load quickly
> > as in "load everything that's absolutely necessary but nothing more."
> > Taint mode is necessary, and half the reason for this proposal.

Make it so. Find a way to turn tainting on for CGI. But don't clutter
the core with application specific functions. Doesn't everyone want to
remove the sockets library from the core?

> But is anything else? I like what Nathan Wiger suggested --- that of the
> common headers function, but I also believe that belongs as a separate
> module. Hence:

<snip> Nice code Mr. Truskett.

Agreed. Split CGI into component parts. If all you want is headers, or
cookies, then you can use those modules without incurring the penalty of
loading all of CGI.pm.

> > > > Robust input parsing: yes.
> > > 
> > > > General purpose output formatting: no, [...]
> > > 
> > > > Rudimentary HTTP header emission: probably.

So this is the definition of first-class? As I've said before,
first-class CGI to me means a language where I can focus on the HTML or
XML I am creating. An example of a first-class CGI language is ASP or my
beloved HTML::Embperl. I don't bother with CGI anymore, and when I did I
was content with CGI.pm.

> > > I think it all belongs in the CGI module really.
> 
> > Then you're probably against this proposal.  No biggie.
> 
> Yeah. I contemplated saying that outright in the previous one but was
> having trouble phrasing it in a friendly sense =)

It seems like we are talking about pulling some functions from a module
to the core. And for no real good reason. Is query string parsing or
header processing so time consuming that it must be implemented in C?

For any sizeable application input and headers will not be enough.
You'll need cookies and redirection certainly. At which point you will
load CGI.pm anyway (if you are bothering to create this in classic CGI).

Tainting sure. Functions no.

Alan Gutierrez

Reply via email to