On Sun, Jan 29, 2012 at 5:18 PM, Gurunandan Bhat
<gbhat@pobox.com> wrote:
I am trying to run multiple Dancer apps under Plack, One of my routes
is an "ajax" route using Dancer::Plugin::Ajax
My $app inside the psgi file is defined as:
my $app = sub {
local $ENV{DANCER_APPDIR} = 'MyAppDir';
setting appdir => 'MyAppDir';
load_app "MyApp";
Dancer::App->set_running_app('MyApp');
Dancer::Config->load;
my $request = Dancer::Request->new( env => $env );
Dancer->dance($request);
};
Unfortunately, the "ajax" route is not recognised and it gives me a 404
However I find that when I add
Dancer::Handler->init_request_headers($env); in the sub, the Ajax
route works fine. Dancer::Handler docs are not available and I need to
understand why this works
Would appreciate if someone could explain
Thank you
_______________________________________________
Dancer-users mailing list
Dancer-users@perldancer.org
http://www.backup-manager.org/cgi-bin/listinfo/dancer-users