Perl: the Markov chain saw | |
PerlMonks |
Re^2: Adding regexps to named URI parameters aka /from/:foo/to/:bar - can it get better than this?by Dallaylaen (Chaplain) |
on Sep 11, 2017 at 09:27 UTC ( [id://1199074]=note: print w/replies, xml ) | Need Help?? |
Thank you, roboticus. Despite my post being a case of "rubber duck debugging", my duck didn't tell me anything, so I had no choice but to submit it. Your answer was quite insightful though. I realized that if I used an actual regexp I would most likely use something like my ($foo, $bar) = $line =~ qr/.../; instead of named captures. I think I'll just add a method to extract unnamed captures from path_info. As for the use cases, IMHO mapping fancy URLs to query parameters is not at all a framework's responsibility. A proxy should do it. However, Mojo and Dancer and Kelp have it and I have to match if I want to ever take off. Thanks again.
In Section
Seekers of Perl Wisdom
|
|