Not sure that I'm reading your snippet correctly, but it seems that your application is trying to call itself. 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.

Even with parallelization in place this is probably a bad idea and it would be better addressed with some refactoring/modularization.

I hope I got it right.

Cheers,

    Flavio.


On Thu, Apr 7, 2011 at 9:30 PM, J. Bobby Lopez <jbl@jbldata.com> wrote:
Experiencing a problem using WWW::Mechanize in Dancer.

Here's how I'm using it: http://pastebin.jbldata.com/m230ae053

Note that I'm able to use the json_api_call() routine in a stand-alone script without issue; but within Dancer, the application just hangs.

Any thoughts?

Thanks,
-Bobby



_______________________________________________
Dancer-users mailing list
Dancer-users@perldancer.org
http://www.backup-manager.org/cgi-bin/listinfo/dancer-users