Subject: | URI::QueryParam does not sets param value to empty string |
Date: | Sat, 2 Aug 2008 19:01:16 +0700 |
To: | <bug-URI [...] rt.cpan.org> |
From: | "Pavel V. Rochnyack" <rpv [...] nikolas.ru> |
I am using URI version 1.37 and have found some issues.
Command
perl -e ' use URI; use URI::QueryParam; $u = URI->new("http://site.com/?foo=z&"); $u->query_param(foo => 1); $u->query_param(foo => 'a'); print $u->as_string;'
returns, as expected: http://site.com/?foo=a
Next test, command
perl -e ' use URI; use URI::QueryParam; $u = URI->new("http://site.com/?foo=z&"); $u->query_param(foo => 1); $u->query_param(foo => undef); print $u->as_string;'
returns (as expected ?): http://site.com/?foo=
But command
perl -e ' use URI; use URI::QueryParam; $u = URI->new("http://site.com/?foo=z&"); $u->query_param(foo => 1); $u->query_param(foo => ''); print $u->as_string; '
returns http://site.com/?foo=1 but I suppose it need to be http://site.com/?foo=
--
Best regards,
Pavel V. Rochnyack mailto:rpv@nikolas.ru