<div dir="ltr">Hi,<div><br></div><div>I think this is due to this line : </div><div><br></div><div><a href="https://github.com/PerlDancer/Dancer/blob/devel/lib/Dancer/Route.pm#L139">https://github.com/PerlDancer/Dancer/blob/devel/lib/Dancer/Route.pm#L139</a><br>
</div><div><br></div><div style>And I don't know the rational for this feature. I don't think we need to pollute the request params with splat, so I vote for its removal. Of course in theory it breaks backward compatibility, so caution must be applied... Anyone ever used $params->{splat} ? I think the splat() function can be used instead in every cases.</div>
<div style><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 26 December 2012 21:33, <span dir="ltr"><<a href="mailto:alois.mahdal.1-ndmail@zxcvb.cz" target="_blank">alois.mahdal.1-ndmail@zxcvb.cz</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello dancers!<br>
<br>
I like Dancer but I'm having a little problem with this<br>
regex/wildcard matching. The issue is that hash returned<br>
by params() in the relevant sub always contains 'splat'<br>
key referring to array of matches.<br>
<br>
Maybe this reference might be useful (when?), what if<br>
I *really* want to pass "splat=splosh"? According to<br>
my testing, the value is lost!<br>
<br>
<br>
Can this behavior be disabled?<br>
<br>
Or is it a bug? (IIUC, I can always do `[ splat ]` so why<br>
the pollution?)<br>
<br>
<br>
For illustration, request is:<br>
<br>
GET /there?splat=splosh&bar=baz<br>
<br>
and relevant route:<br>
<br>
get qr{(.*)} => sub {<br>
my $params = params();<br>
my ($path) = splat; # '/there'<br>
my $foo = $params->{foo}; # 'bar'<br>
my $splat = $params->{splat}; # [ '/path' ] instead<br>
# of 'splosh'!<br>
my $splat = param('splat'); # '/there'<br>
}<br>
<br>
<br>
Thanks,<br>
aL.<span class="HOEnZb"><font color="#888888"><br>
<br>
-- <br>
Alois Mahdal<br>
______________________________<u></u>_________________<br>
dancer-users mailing list<br>
<a href="mailto:dancer-users@dancer.pm" target="_blank">dancer-users@dancer.pm</a><br>
<a href="http://lists.preshweb.co.uk/mailman/listinfo/dancer-users" target="_blank">http://lists.preshweb.co.uk/<u></u>mailman/listinfo/dancer-users</a><br>
</font></span></blockquote></div><br></div>