Apache::Request and parameters = 0

2000-10-05 Thread John Reid
Hi guys Has anyone any experience of passing a 0 as a parameter value through Apache::Request. I am passing a QUERY_STRING like ?param1=value1param2=0param3=value3. It appears that the 0 is being interpretted as an empty string. Is this a bug/expected behaviour or am I looking in completely the

Re: Apache::Request and parameters = 0

2000-10-05 Thread Matt Sergeant
On Thu, 5 Oct 2000, John Reid wrote: Hi guys Has anyone any experience of passing a 0 as a parameter value through Apache::Request. I am passing a QUERY_STRING like ?param1=value1param2=0param3=value3. It appears that the 0 is being interpretted as an empty string. Is this a bug/expected

Re: Apache::Request and parameters = 0

2000-10-05 Thread Dana C. Chandler III
Matt Sergeant wrote: On Thu, 5 Oct 2000, John Reid wrote: Hi guys Has anyone any experience of passing a 0 as a parameter value through Apache::Request. I am passing a QUERY_STRING like ?param1=value1param2=0param3=value3. It appears that the 0 is being interpretted as an empty

Re: Apache::Request and parameters = 0

2000-10-05 Thread Matt Sergeant
On Thu, 5 Oct 2000, Dana C. Chandler III wrote: In my limited experience, it is Perl in general that treats the value 0, in a query string as the empty string. In all of the scripts I have written, if 0 is possible as a param value, I have to explicity check for 0. This is only the case

Re: Apache::Request and parameters = 0

2000-10-05 Thread John Reid
Matt Sergeant wrote: On Thu, 5 Oct 2000, Dana C. Chandler III wrote: In my limited experience, it is Perl in general that treats the value 0, in a query string as the empty string. In all of the scripts I have written, if 0 is possible as a param value, I have to explicity check for

Re: Apache::Request and parameters = 0

2000-10-05 Thread Dana C. Chandler III
Matt Sergeant wrote: On Thu, 5 Oct 2000, Dana C. Chandler III wrote: In my limited experience, it is Perl in general that treats the value 0, in a query string as the empty string. In all of the scripts I have written, if 0 is possible as a param value, I have to explicity check for

Re: Apache::Request and parameters = 0

2000-10-05 Thread Matt Sergeant
On Thu, 5 Oct 2000, Dana C. Chandler III wrote: Yes, in particular, $value = $r-param('name') || ""; Or worse, $r-param('name') || "3"; # default but true Even I'm guilty of that one sometimes :-) -- Matt/ ** Director and CTO ** ** AxKit.com Ltd ** ** XML Application Serving ** **

RE: Apache::Request and parameters = 0

2000-10-05 Thread Geoffrey Young
-Original Message- From: Matt Sergeant [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 05, 2000 9:57 AM To: Dana C. Chandler III Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: Apache::Request and parameters = 0 On Thu, 5 Oct 2000, Dana C. Chandler III wrote: Yes

RE: Apache::Request and parameters = 0

2000-10-05 Thread Matt Sergeant
On Thu, 5 Oct 2000, Geoffrey Young wrote: however, just for clarity, I don't see how this is a bug in Apache::Request (as you originally pointed out)... #!/usr/bin/perl use Apache::Request; my $r = Apache::Request-new(shift); my $value = $r-param('foo');

RE: Apache::Request and parameters = 0

2000-10-05 Thread Geoffrey Young
-Original Message- From: Matt Sergeant [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 05, 2000 10:26 AM To: Geoffrey Young Cc: Dana C. Chandler III; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: Apache::Request and parameters = 0 [snip] You're right... I was remembering

RE: Apache::Request and parameters = 0

2000-10-05 Thread Matt Sergeant
On Thu, 5 Oct 2000, Geoffrey Young wrote: package FooTest; use Apache::Constants; use Apache::Reload; sub handler { my $r = shift; $r-send_http_header; print "Args: ", scalar $r-args, "\n"; return OK; } 1; Now send a request with the

RE: Apache::Request and parameters = 0

2000-10-05 Thread Geoffrey Young
-Original Message- From: Matt Sergeant [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 05, 2000 10:53 AM To: Geoffrey Young Cc: Dana C. Chandler III; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: Apache::Request and parameters = 0 [snip] ok, I see that. Apache