[Dancer-users] 1.1809 broke my 1.808 load_app

franck franck at lumberjaph.net
Fri Sep 3 11:31:33 CEST 2010


Hi

for your information, a new version (1.1811) have been uploaded to CPAN
(should be available in your favorite mirror soon). This new version fix
this. Now, both /bar and /bar/ will match the same route.

On Sun, Aug 29, 2010 at 7:36 AM, P Kishor <punk.kish at gmail.com> wrote:

> 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
> =======================================================================
> _______________________________________________
> Dancer-users mailing list
> Dancer-users at perldancer.org
> http://www.backup-manager.org/cgi-bin/listinfo/dancer-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.backup-manager.org/pipermail/dancer-users/attachments/20100903/1c6668b7/attachment.htm>


More information about the Dancer-users mailing list