http://brianhammond.com/ via RT wrote:
Show quoted text> On Fri Jan 13 18:05:48 2006, jose.mico@gmail.com wrote:
>
That was three and half years ago :-) I dont' remember exactly what was
the problem, let's see how good my report was ;-)
Show quoted text> $ perl -e '("", "", "") or print "hey there\n";'
> hey there
>
> why are you assuming that a list with 3 empty string elements would be
> equivalent to a false condition?
>
Exactly the opposite, seems that I've founded a place where returning
("", "", "") is not evaluated to a false condition as it should be. The
problem was subtle, and was triggered because the returned list was
evaluated in list context (so was always 3), and the 'or' block was
never executed. Note that the following does not output anythig:
$ perl -e '@foo = ("", "", "") or print "hey there\n";'
Looking into the source, I can see that the buggy:
my ( $method, $request_uri, $proto ) = $self->parse_request or
do { $self->bad_request }
...was already replaced by the more sane:
my ( $method, $request_uri, $proto ) = $self->parse_request;
unless ($self->valid_http_method($method) ) { $self->bad_request }
So that bug does not exist anymore, and you can safely close the ticket :-)
José