Re: [PATCH] use CGI.pm;

On Wed, Sep 29, 1999 at 02:31:02PM +0200, Terje Bless wrote:
> On 28.09.99 at 19:39, Gerald Oskoboiny <gerald@w3.org> wrote:
> >[...] this syntax doesn't seem to be supported by CGI.pm:
> ><URL:http://validator.w3.org:8000/check?uri=http://www.w3.org/;ss;sp;outline>
> >and I'm not sure how to fix that. It wants '=' after the parameters, or
> >else they don't get defined.
> >
> >This works:
> ><URL:http://validator.w3.org:8000/check?uri=http://www.w3.org/&ss=&sp=&outline=>
> >
> >Any ideas how to support the old syntax as well?
> 
> Found & Fixed, but...

Thanks! I've applied your patch, and now the version running on
the live site includes your earlier CGI.pm patch.

> ...I'm not quite willing to accept this as a bug in /my/ code yet

No, I'm sure it's not; I hope I didn't imply it was.

> (allthough I should of course have caught this in testing).

I've realized that it's impossible to keep track of all the
things I need to test when making updates to the service, so I
put a bunch of test cases online:

    http://validator.w3.org/dev/tests/

and I test each of them whenever making non-trivial changes.

> CGI.pm is returning an empty string for "p=", but 'undef' for "p".
> Depending on whether you view that as wrong or merely inconsistent, this is
> either a bug or a mis-feature.
> 
> Also, from reading the HTML 4.0 specification, I'm under the distinct
> impression that that calling convention is wrong. It doesn't spell it out,
> but it implies that there should _allways_ be a value for each parameter;
> even if that value is the empty string. Nowhere does it suggest the
> existance of a pure boolean parameter type or that "p=" == "p".

I just made that syntax up to make it look nicer to humans.

> I'll take the CGI.pm issue to it's maintainer to get his opinion and I'd
> appreciate it if you'd take the specification issue to the right person at
> W3C (I'd do it myself, but I don't know who to contact). I may be utterly
> wrong where CGI.pm's behaviour is concerned, but the HTML specification
> really should address this; even if just to say "booleans may occur".

Well, I had no reason to expect the syntax I made up would parse
with someone else's CGI library.

> I'm attaching a patch against
> <URL:http://validator.w3.org:8000/dev/check-current.txt> (as of around
> 10:30am UTC today) that will work around this problem. Regardless of what I
> think of it, it's clear that this is too important a compatibility concern
> to drop this support; assuming my take on the issue is even correct.

Thanks again, and keep 'em coming!

-- 
Gerald Oskoboiny       <gerald@w3.org>  +1 617 253 2920
System Administrator   http://www.w3.org/People/Gerald/
World Wide Web Consortium (W3C)      http://www.w3.org/

Received on Monday, 4 October 1999 14:05:41 UTC