<div dir="ltr">There are two issues open for going over this part. I hope to have them resolved this week to cover all cases.<div><br></div><div>It makes sense to anchor them, but I believe we found an issue which made us change it. Should dig through the Git history when doing this.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Dec 15, 2014 at 10:02 AM, Gabor Szabo <span dir="ltr"><<a href="mailto:gabor@szabgab.com" target="_blank">gabor@szabgab.com</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>I just found an issue with my D1 => D2 migration that broke the Perl Maven site.</div><div>I think I managed to fix it but I'd like to clarify this:</div><div><br></div><div>I used to have a route handler like this:</div><div>







<p><span>get </span><span>qr{/pro/</span><span>(.*)</span><span>}</span><span> => </span><span>sub </span><span>{</span></p>
<p><span>    </span><span>my</span><span> (</span><span>$path</span><span>) = splat;</span></p>
<p><span>    </span><span>return</span><span> </span><span>$path</span><span>;</span></p>
<p><span>};</span></p></div><div>In D1 this was matching only routes that started with /pro</div><div>As if there was an implicit ^ at the beginning of the route.</div><div><br></div><div>Now, in D2, it will match anywhere so it started to match URLs such as</div><div>/media/pro/file</div><div><br></div><div>I could fix this by adding an explicit caret to the beginning of the regex:</div><div><br></div><div><div><p><span>get </span><span>qr{^/pro/</span><span>(.*)</span><span>}</span><span> => </span><span>sub </span><span>{</span></p><p><span>    </span><span>my</span><span> (</span><span>$path</span><span>) = splat;</span></p><p><span>    </span><span>return</span><span> </span><span>$path</span><span>;</span></p><p><span>};</span></p><p>Please confirm if this is really the case or if I just had some other issues?</p></div></div><div><span>I think this should be added to the migration document with the recommended solution.</span></div><div><span><br></span></div><div>Could I have solved this with the "prefix" keyword? How? Would that be better?<br></div><div><br></div><div>regards</div><span class="HOEnZb"><font color="#888888"><div>    Gabor</div><div><br></div><div><br></div><br clear="all"><div><br></div>-- <br><div><div dir="ltr">Gabor Szabo                     <a href="http://szabgab.com/" target="_blank">http://szabgab.com/</a><br>Perl Maven                       <a href="http://perlmaven.com/" target="_blank">http://perlmaven.com/</a><br>Perl Weekly                       <a href="http://perlweekly.com/" target="_blank">http://perlweekly.com/</a><br>Phone:                             <a href="tel:%2B972-54-4624648" value="+972544624648" target="_blank">+972-54-4624648</a></div></div>
</font></span></div>
<br>_______________________________________________<br>
dancer-users mailing list<br>
<a href="mailto:dancer-users@dancer.pm">dancer-users@dancer.pm</a><br>
<a href="http://lists.preshweb.co.uk/mailman/listinfo/dancer-users" target="_blank">http://lists.preshweb.co.uk/mailman/listinfo/dancer-users</a><br>
<br></blockquote></div></div>