[Dancer-users] Problem with WWW::Mechanize in Dancer
J. Bobby Lopez
jbl at jbldata.com
Fri Apr 8 06:01:33 CEST 2011
I guess I thought that I should be able to make a call to another Route
within the same application, since WWW::Mechanize is acting like regular
Other route would have provided the information requested. If we can't do
this, then how are we able to handle simultaneous connections to Dancer?
It seems to me that the route should have been able to be processed via
requested URL. If I am certainly wrong then please forgive me, and share
further detail if you can.
Is the only alternative to run two instances of Dancer? One for the API and
one for the UI? Or is it to run a stand-alone CGI script which makes JSON
RPC calls to the API, outside of dancer?
On Thu, Apr 7, 2011 at 5:41 PM, David Precious <davidp at preshweb.co.uk>wrote:
> 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
> > on $browser to see what's going on.
> It ought to work if running the app via e.g. Starman, where multiple
> are forked to handle multiple requests at once, but yes, with the
> server, it will fail.
> > Even with parallelization in place this is probably a bad idea and it
> > be better addressed with some refactoring/modularization.
> Dave P
> David Precious ("bigpresh")
> "Programming is like sex. One mistake and you have to support
> it for the rest of your life". (Michael Sinz)
> Dancer-users mailing list
> Dancer-users at perldancer.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Dancer-users