[Dancer-users] Problem with WWW::Mechanize in Dancer

Flavio Poletti polettix at gmail.com
Thu Apr 7 23:31:46 CEST 2011


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 at 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 at perldancer.org
> http://www.backup-manager.org/cgi-bin/listinfo/dancer-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.backup-manager.org/pipermail/dancer-users/attachments/20110407/1dfcdc5a/attachment.htm>


More information about the Dancer-users mailing list