Subject: | url_param() can return true even when no url parameters (unlike param()) |
Date: | Tue, 24 Feb 2009 12:26:16 -0900 |
To: | bug-CGI.pm [...] rt.cpan.org |
From: | "Britton Kerin" <bkerin [...] fastmail.fm> |
The standard idiom that even shows up in the synopsis example tells
you to use
if ( param() ) { ...
to find out if you have parameters. The section that describes
url_param() says:
To retrieve URL parameters, call the url_param() method. Use it in
the
same way as param(). The main difference is that it allows you to
read
the parameters, but not set them.
But it seems that url_param() will return true even when there are not
?foo=bar style thingies given in the URL. Even if its expected for some
reason that it returns true I think it deserves a doc mention.
Britton