[Dancer-users] Problem with WWW::Mechanize in Dancer
David Precious
davidp at preshweb.co.uk
Thu Apr 7 23:41:51 CEST 2011
On Thursday 07 April 2011 22:31:46 Flavio Poletti wrote:
> Not sure that I'm reading your snippet correctly, but it seems that your
> application is trying to call itself.
That does indeed appear to be the case, which seems an odd approach.
> Unless you're putting some
> parallelization mechanism, this will never, ever work: the second request
> will be served only *after* the initial one is completed, and the initial
> hangs waiting for a response to the second. I suggest to put a low timeout
> on $browser to see what's going on.
It ought to work if running the app via e.g. Starman, where multiple processes
are forked to handle multiple requests at once, but yes, with the standalone
server, it will fail.
> Even with parallelization in place this is probably a bad idea and it would
> be better addressed with some refactoring/modularization.
Indeed.
Cheers
Dave P
--
David Precious ("bigpresh")
http://www.preshweb.co.uk/
"Programming is like sex. One mistake and you have to support
it for the rest of your life". (Michael Sinz)
More information about the Dancer-users
mailing list