Re: CGI ponderings

Martijn Koster (m.koster@nexor.co.uk)
Mon, 19 Jun 1995 15:42:55 +0100


In message <9506170009.ac10224@post.demon.co.uk>, Tim Bunce writes:

> > 	$SIG{__DIE__} = sub {
> > 	$SIG{__WARN__} = sub {
> > 
> Umm, is it worth wrapping into a module? As soon as I think about
> generalising it there is almost nothing left. This probably belongs
> in the CGI::Base pod text. Should I add it in?

I think having sensible defaults for these signal handlers is a good
idea; I'm using them too, and where I don't I should :-) Why not put
them into CGI::Base and allow them to be switched off?

> > The other would save punctation, allowing you to write things
> > like this:
> >     
> >     if (@user_query) {
> >         H2 "User Query";
> >         DLstart;
> >         DT;
> >             print "You want me to execute the following query:";
> >         DD; 
> >             P;   
> > [etc]

I'm not completely convinced about this yet, I usually prefer seeing
clearly what's happening and use <<TAG to do that. That way you can
also store it onto a variable, and splat it out at once (or not if you
encounter an error). But this is probably a personal preference.

-- Martijn
__________
Internet: m.koster@nexor.co.uk
X-400: C=GB; A= ; P=Nexor; O=Nexor; S=koster; I=M
WWW: http://web.nexor.co.uk/mak/mak.html