Skip Menu |

This queue is for tickets about the Template-Toolkit CPAN distribution.

Report information
The Basics
Id: 99522
Status: resolved
Priority: 0/
Queue: Template-Toolkit

People
Owner: Nobody in particular
Requestors: linnando [...] yandex.ru
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Empty arguments are incorrectly skipped in Template::Plugin::URL
Date: Thu, 16 Oct 2014 00:32:20 +0300
To: bug-template-toolkit [...] rt.cpan.org
From: Ruslan Batdalov <linnando [...] yandex.ru>
The code of Template::Plugin::URL skips arguments whose value is an empty string: my $urlargs = join($JOINT, map { args($_, $combo->{ $_ }) } grep { defined $combo->{ $_ } && length $combo->{ $_ } } sort keys %$combo); But RFCs don't require an argument value to be non-empty. CGI module also differentiates between absent and empty params - the first one is undefined, while the second one is defined but zero-length. With current Template::Plugin::URL I can't use this distinction. So, probably the code should be the following: my $urlargs = join($JOINT, map { args($_, $combo->{ $_ }) } grep { defined $combo->{ $_ } } sort keys %$combo);
Ticket migrated to github as https://github.com/abw/Template2/issues/125