So, the only way I am able to get Dancer 1.1805 deploy under Apache2 CGI is by using get r('.*') => sub {} Unfortunately, I can't seem to figure out how to use the captured route value. `splat` doesn't seem to do the trick. For example ---- get r('.*') => \&default; sub default { my ($route) = splat; my $route = $route ? $route : 'welcome'; my $template_opts = { route => $route }; template 'index.tt', $template_opts; }; ---- and then, in my index.tt ---- Hello, and [% route %]. ---- However, when I go to http://myapp/, I get ---- Hello, and 1. ---- If I go to http://myapp/foo, I get a 404 again. I believe I might just be back at an impasse whereby I am simply unable to run Dancer with Apache2 under CGI. A bit of an explanation as to why I am adamant about Apache2/CGI. It is the second easiest environment to develop under, for me at least. While launching `perl ./myapp.pl` on port 3000 is the easiest, that is not even an intermediate term solution. My servers run Apache or Apache2, and even my shared web servers run Apache/Apache2. My web site is not very high traffic, so CGI serves just as well for me. I believe Apache2/CGI can easily serve several 10s of thousands of hits a day. Once I need it, I can and will move to mod_perl, in which case I can use Plack, however, even with Plack, I am running into the dreaded 404 error. However, mod_perl is considerably more difficult to install on different servers, so CGI is the preferred option. -- 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 =======================================================================
On 15/08/2010 18:06, P Kishor wrote:
So, the only way I am able to get Dancer 1.1805 deploy under Apache2 CGI is by using
get r('.*') => sub {}
Unfortunately, I can't seem to figure out how to use the captured route value. `splat` doesn't seem to do the trick. For example
Hi, As you may know, Dancer's core has been heavily rewritten recently and we plan to release very soon a new CPAN version based on this rewrite. You can already give this version a try by installing the new developer release: 1.1806_02 which was uploaded to CPAN a couple of days ago. Chances are that the bug you're facing is already solved. If not, it's better to report your problem against that version as we spend all our time on testing and fixing this branch. The current master branch (which is the one of 1.1805 on CPAN) will soon be obsolete. If you can test that new version and give us some feedback, that would be helpful. Thanks. Regards, Alexis.
Alexis, A quick reply re. 1.1806_02 On Mon, Aug 16, 2010 at 1:01 AM, Alexis Sukrieh <sukria@sukria.net> wrote:
On 15/08/2010 18:06, P Kishor wrote:
So, the only way I am able to get Dancer 1.1805 deploy under Apache2 CGI is by using
get r('.*') => sub {}
Unfortunately, I can't seem to figure out how to use the captured route value. `splat` doesn't seem to do the trick. For example
Hi,
As you may know, Dancer's core has been heavily rewritten recently and we plan to release very soon a new CPAN version based on this rewrite.
You can already give this version a try by installing the new developer release: 1.1806_02 which was uploaded to CPAN a couple of days ago.
In my extreme frustration yesterday, I did install 1.1806_02 yesterday, and discovered that much as indeed changed. Most importantly, since app.psgi file doesn't exist anymore, things seem a bit simpler (more on this in a bit), but unfortunately, dispatch.cgi hadn't been updated... it was still looking for a psgi file, which, of course, doesn't exist. See the code for the dancer helper script <code> "dispatch.cgi" => "$PERL_INTERPRETER use Plack::Runner; Plack::Runner->run('[% appdir %]/app.psgi') </code> So, I was back to a dead-end alley. I guess things are pretty volatile, and sadly I have to demo a working app to others, so for now, I have reverted back to 1.1805, and am working with code that actually works somewhat.
Chances are that the bug you're facing is already solved. If not, it's better to report your problem against that version as we spend all our time on testing and fixing this branch.
The current master branch (which is the one of 1.1805 on CPAN) will soon be obsolete.
If you can test that new version and give us some feedback, that would be helpful.
Thanks.
Regards,
Alexis. _______________________________________________ Dancer-users mailing list Dancer-users@perldancer.org http://www.backup-manager.org/cgi-bin/listinfo/dancer-users
-- 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 =======================================================================
Le 16/08/2010 16:17, P Kishor a écrit :
[...] In my extreme frustration yesterday, I did install 1.1806_02 yesterday, and discovered that much as indeed changed. Most importantly, since app.psgi file doesn't exist anymore, things seem a bit simpler (more on this in a bit), but unfortunately, dispatch.cgi hadn't been updated... it was still looking for a psgi file, which, of course, doesn't exist. See the code for the dancer helper script
[...] Indeed, that's a mistake, will fix that soon.
So, I was back to a dead-end alley. I guess things are pretty volatile, and sadly I have to demo a working app to others, so for now, I have reverted back to 1.1805, and am working with code that actually works somewhat.
That's perfectly understandable. I just want you to know that Franck and I ware wroking very hard to make the new codebase very stable, and that also means fix documentation and deploymebnt issues. I'm sure your issue will soon be fixed. thanks for your interest and trust. Regards.
participants (2)
-
Alexis Sukrieh -
P Kishor