[Catalyst-dev] uri_for() and URI fragments

Ronald J Kimball rkimball at pangeamedia.com
Fri Aug 27 13:45:03 GMT 2010

I have an app that is currently running on Catalyst 5.7007, which I am
working on migrating to the current version.  I have discovered a
regression in how uri_for() handles URI fragments (the part of the URI
after a #).

I have a call to uri_for() like this

  '/user/' . $username . '#comments',
  {request_comment_id => $comment_id},

With 5.7007, the resulting URI ends:

But with a newer Catalyst, it ends:

5.7007 used the URI module to create the URI.  Starting in 5.7008 [*]
a big block of custom code is used instead.   While this provides
better performance, it is much less reliable.

Is this a bug that should be fixed, or is there a different, correct
way of specifying a URI fragment with uri_for?

[*] In another quirk, the changelog incorrectly lists this change for
5.7007; it actually changed in 5.7008.


More information about the Catalyst-dev mailing list