[Dancer-users] Newbie questions: filter fail

Joel Roth joelz at pobox.com
Fri Nov 26 02:09:40 CET 2010

On Wed, Nov 24, 2010 at 10:01:56PM +0200, sawyer x wrote:
> On Tue, Nov 23, 2010 at 3:49 PM, Joel Roth <joelz at pobox.com> wrote:
> >
> > I didn't know a new Dancer was out.
> > I just installed it... fixes the filter error
> >
> >
> Glad to hear it!
> >
> > Any suggestions would be welcome. :-)
> >
> >
> There is a known issue that is already fixed in the source (but not released
> to CPAN yet) of a race condition in engine triggers. This affects
> Dancer::Session::Cookie, for example.
> This might be what you're experiencing.
> I would really appreciate it if you could try and install the latest source
> (from Github) and see if it resolves your problem.
> If not, I sure would like to dwelve into it and fix it.

I would also like to experiment with this, however I have a
more pressing deployment question.

Dancer::Deployment says:

    your Dancer app can be run as a simple cgi-script out-of-the-box. No
    additional web-server configuration needed.  Your web server should
    recognize .cgi files and be able to serve Perl scripts.  The Perl module
    Plack::Runner is required.


    This option is a no-brainer...

I think this description is misleading. Blosxom, which I 
have previously used is not a no-brainer, either, but at
least it is a single cgi script. 

To get to the point of deploying a simple Dancer app, I did
the following:

1. Bootstrap local::lib and configure environment variables
2. Install cpanminus # easier than configuring cpan client
3. Install all of Dancer

Then to execute the dancer app I needed to:

4. Use an intermediate shell script (dispatch.cgi) to set the environment variables
5. End the script by exec'ing the dancer app (chi2.cgi)

Now things are looking close. 

Dancer starts as usual, listening on port 3000, if I run the
dispatch.cgi script while logged in. 

However when I trigger the app through a link:


There is no page returned. The error log reports that
dancer is still trying to be a web server.

    [Thu Nov 25 16:35:56 2010] [error] [client] >>
    Dancer server 15454 listening on

I have Plack::Runner installed. I have not attempted any
mod_rewrite magic yet.

Can you suggest how I might coax Dancer to return a web page 
right away with whatever input it has?

Thanks :)


> Sawyer.

Joel Roth

Joel Roth

More information about the Dancer-users mailing list