[Dancer-users] dancer bug

P Kishor punk.kish at gmail.com
Sun Aug 15 13:47:25 CEST 2010

On Sun, Aug 15, 2010 at 1:39 AM, sawyer x <xsawyerx at gmail.com> wrote:
> On Sun, Aug 15, 2010 at 5:35 AM, P Kishor <punk.kish at gmail.com> wrote:
>> from http://perlsharedhosting.com/tech/frameworks/dancer
>> "
>> Note – there is a bug in Dancer version 1.1803 causing routes to work
>> incorrectly under some versions of Apache. Hopefully by the time you
>> read this the bug will be fixed, but in the meantime, edit
>> ~/dancertest/lib/dancertest.pm and change the default route so that it
>> matches all paths:
>> view source
>> print?
>> get r('.*') => sub {
>>    template 'index';
>> };
>> "
> What versions of Apache? Has anyone investigated into this and was able to
> provide a test case or at least an environment in which it is possible to
> replicate the issue? Is it in our Github issues?
> Perhaps we should contact perlsharedhosting.com.

No need to contact anyone else. I am firsthand experiencing the above
bug with Apache2 and Dancer 1.1805. Basically, if trying to deploy
with Apache2 under regular CGI or FastCGI, <code>get '/'</code> simply
doesn't work. I keep on getting 404. I can break my head against every
possible documentation, but I get 404. Change <code>get '/'</code> to
<code>get r('.*')</code> and it starts working.

With regards to deployment, that is only half of the story, albeit the
sordid half. The other half is that Dancer doesn't deploy out of the
box. Out of the box, the dispatch.cgi script is under public, so the
only way to reach that script is to use the uri
http://myapp/public/dispatch.cgi. Therefore, dispatch.cgi needs to be
moved one level above public. However, now, all the paths to the css
are screwed. So, the paths to the css have to be adjusted from
'/css/style.css' to /public/css/style.css'

One question -- did anyone actually do the Apache2 CGI deployment
before writing those docs, because, as is, those docs don't work at
all. I don't know what is better -- not have any docs at all or to
have misleading docs.

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