Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Path-Router CPAN distribution.

Report information
The Basics
Id: 78388
Status: resolved
Priority: 0/
Queue: Path-Router

Owner: Nobody in particular
Requestors: CFOUTS [...]

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

Subject: Path component values getting erroneously dropped
Download (untitled) / with headers
text/plain 218b
The mapping for a placeholder path component gets discarded if the component's value evaluates to false, as in the example cases given in the test file. I tried to sort it out but got lost amid the source generation.
text/x-perl 430b
#!/usr/bin/env perl use strict; use warnings; use Test::More; use Path::Router; my $router = Path::Router->new; $router->add_route( '/asdf/:foo/:bar' ); my @paths = ( ['/asdf/123/456', '123', '456'], ['/asdf/0/456', '0', '456'], ['/asdf/123/0', '123', '0'], ); for (@paths) { my $match = $router->match($_->[0]); is $match->mapping->{foo}, $_->[1]; is $match->mapping->{bar}, $_->[2]; } done_testing;
Fixed in 0.12.

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to