Open reneeb opened 3 years ago
You made the placeholder optional, and usually url_for will try to make the path as short as possible.
Is it really optional when there are other parts after the placeholder? url_for
generates URLs that result in 404s.
Steps to reproduce the behavior
Prints
Expected behavior
I would expect that the area placeholder is replaced with hallo in the first and fourth call.
And as content negotiation via file suffix was disabled by default in 9.11 and 9.17 added
?_format=*
, I would expect url_for to return/admin/hallo/test?_format=json
in the last call.This is all done in https://github.com/mojolicious/mojo/blob/main/lib/Mojolicious/Routes/Pattern.pm (sub render)