[Catalyst] How to get uri_for something with a fragment?

Larry Leszczynski larryl at emailplus.org
Mon Mar 7 21:30:01 GMT 2011

> Using the fragment is probably a bad idea. It's not supported by all
> servers so it can end up lost on the backend depending on your setup.

I have see fragments cause problems in server-side code that is naive
about URL handling, like splitting the string on "?" and assuming all
the stuff after the question mark is query params when it might in fact
include a fragment.

Since most (all?) of the URLs you see being passed around in Catalyst
code are actual URI objects (http://search.cpan.org/perldoc?URI), just
treat them as objects and use all the nice URI methods for manipulating
them and you'll be fine.


More information about the Catalyst mailing list