[Catalyst-dev] uri_for() and URI fragments

Ronald J Kimball rkimball at pangeamedia.com
Fri Sep 3 13:07:36 GMT 2010


On Wed, Sep 1, 2010 at 6:20 PM, Tomas Doran <bobtfish at bobtfish.net> wrote:
>
> On 27 Aug 2010, at 14:45, Ronald J Kimball wrote:
>>
>> Is this a bug that should be fixed, or is there a different, correct
>> way of specifying a URI fragment with uri_for?
>
> No, it's almost certainly a bug.
>
> Any chance of a failing test case?

This test should be added to t/aggregate/unit_core_uri_for.t:

is(
    Catalyst::uri_for( $context, '/bar#anchor', { param1 => 'value1' }
)->as_string,
    'http://127.0.0.1/foo/bar?param1=value1#fragment',
    'URI for path with fragment and query params'
);


#   Failed test 'URI for path with fragment and query params'
#   at t/aggregate/unit_core_uri_for.t line 61.
#          got: 'http://127.0.0.1/foo/bar#anchor?param1=value1'
#     expected: 'http://127.0.0.1/foo/bar?param1=value1#fragment'


Ronald



More information about the Catalyst-dev mailing list