[Dancer-users] dance being called twice
P Kishor
punk.kish at gmail.com
Wed Aug 25 02:04:10 CEST 2010
I am still on Dancer 1.1805. I have a weird problem. For some reason,
my application seems to be running twice for every request. I put a
few debug messages, and you can see below what is happening. Here is
the skeleton of my app, with line numbers.
1> get '/foo/:bar' => sub {
1> debug 'in foo with param = ' . params->{offset};
1> qux( params->{bar}, 'foo' );
1> };
26> get '/*?' => sub {
27> my ($p) = splat;
28> $p = 'lat' unless $p;
29> debug 'in bar with param = ' . $p;
30> qux( params->{bar}, 'bar' );
31> };
293> sub qux {
294> my ($from) = @_;
295> debug "in qux with param = " . $from;
296> }
Here is the debug log. Each time I refresh the browser, I get two hit
#1 and two hit #5. What is going on?
[68325] debug @0.000540> [hit #1] in bar with param = lat in ../dance.pm l. 29
[68325] debug @0.040846> [hit #1] in qux with param = bar in ../dance.pm l. 295
[68325] debug @0.000396> [hit #5] in bar with param = lat in ../dance.pm l. 29
[68325] debug @0.000868> [hit #5] in qux with param = bar in ../dance.pm l. 295
[68328] debug @0.000409> [hit #1] in bar with param = lat in ../dance.pm l. 29
[68328] debug @0.001359> [hit #1] in qux with param = bar in ../dance.pm l. 295
[68328] debug @0.000396> [hit #5] in bar with param = lat in ../dance.pm l. 29
[68328] debug @0.000864> [hit #5] in qux with param = bar in ../dance.pm l. 295
--
Puneet Kishor
More information about the Dancer-users
mailing list