#!/usr/bin/perl 

use lib "/www/opals/module";;
use Opals::Context('/etc/opals/conf/opl_ha');
use strict;
use REST::Client;
my $location="montreal";
my $url_woeid="https://query.yahooapis.com/v1/public/yql?q=select woeid from geo.places where text=\"$location\" limit 1&diagnostics=true&format=xml";
my $restClient=REST::Client->new({timeout => 60});

$restClient->GET($url_woeid);
print $restClient->responseCode ,"\n";
print $restClient->responseContent, "\n";
