[Dancer-users] 1.1809 broke my 1.808 load_app

P Kishor punk.kish at gmail.com
Sun Aug 29 07:36:46 CEST 2010


On Sat, Aug 28, 2010 at 11:29 AM, P Kishor <punk.kish at gmail.com> wrote:
> so, I discovered the error...
>
> On Sat, Aug 28, 2010 at 11:20 AM, P Kishor <punk.kish at gmail.com> wrote:
>> I had the following in 1.1808 and it worked
>>
>> package foo;
>> use Dancer ':syntax';
>>
>> load_app "foo::bar" , prefix => "/bar";
>> load_app "foo::baz", prefix => "/baz";
>>
>>
>> and my filesystem is
>>
>> app/
>>  lib/
>>    foo.pm
>>    foo/
>>      bar.pm
>>      bar/
>>        barstuff.pm
>>      baz.pm
>>      baz/
>>        bazstuff.pm
>>
>> I just upgraded Dancer to 1.1809, and now I get a four oh four on /bar and /baz
>>
>
>
>
> In 1.1808 --
> - if I went to http://<server>/bar, it worked, but if I went to
> http://<server>/bar/ I would get a 404. I was meaning to ask about it,
> but never did.
>
> Now, in 1.1809 --
> - if I go to http://<server>/bar I get a 404, but if I go to
> http://<server>/bar/ it works. The behavior has reversed, rather
> inexplicably.
>
> All this is using the built in HTTP::Simple::PSGI server (or whatever
> it is.. y'know, but running perl foo.pl)
>
> Ideally, I would want both http://<server>/bar and
> http://<server>/bar/ to return the correct path.
>
> How do I enable that?


The following in foo.pm accomplishes what I want

get '/bar' => sub { redirect '/bar/'; };
get '/baz' => sub { redirect '/baz/'; };


I wish Dancer would take care of the above, but at least it works for now.



>
>> What gives?
>>
>>
>> --
>> Puneet Kishor
>>
>
>
>
> --
> Puneet Kishor http://www.punkish.org
> Carbon Model http://carbonmodel.org
> Charter Member, Open Source Geospatial Foundation http://www.osgeo.org
> Science Commons Fellow, http://sciencecommons.org/about/whoweare/kishor
> Nelson Institute, UW-Madison http://www.nelson.wisc.edu
> -----------------------------------------------------------------------
> Assertions are politics; backing up assertions with evidence is science
> =======================================================================
>



-- 
Puneet Kishor http://www.punkish.org
Carbon Model http://carbonmodel.org
Charter Member, Open Source Geospatial Foundation http://www.osgeo.org
Science Commons Fellow, http://sciencecommons.org/about/whoweare/kishor
Nelson Institute, UW-Madison http://www.nelson.wisc.edu
-----------------------------------------------------------------------
Assertions are politics; backing up assertions with evidence is science
=======================================================================


More information about the Dancer-users mailing list