Re: [Dancer-users] Newbie questions: filter fail
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@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. Later: 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: http://domain.com/dispatch.cgi 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 76.201.170.33] >> Dancer server 15454 listening on http://0.0.0.0:3000 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 :) Joel
Sawyer.
-- Joel Roth -- Joel Roth
On Thu, Nov 25, 2010 at 03:09:40PM -1000, Joel Roth wrote:
Can you suggest how I might coax Dancer to return a web page right away with whatever input it has?
Here is the answer: use Plack::Runner; Plack::Runner->run('/path/to/your/app.psgi'); http://www.sukria.net/fr/archives/2010/01/11/using-plack-to-run-a-dancer-app... Easy peasy! Dancer rocks!! :) -- Joel Roth
participants (1)
-
Joel Roth