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