
appetitto
Novice
Nov 12, 2012, 7:19 AM
Post #1 of 2
(8691 views)
|
WWW::Wunderground::API - Can't bless non-reference value at
|
Can't Post
|
|
Hi, I would like to use this module: http://search.cpan.org/~nebulous/WWW-Wunderground-API-0.04/lib/WWW/Wunderground/API.pm My code is like here:
use WWW::Wunderground::API; #using the json API. my $wun = new WWW::Wunderground::API(location=>'KIAD', api_key=>'your wunderground API key'); print 'The temperature is: '.$wun->data->temp_f."\n"; print 'The rest of the world calls that: '.$wun->temp_c."\n"; #Keys are AUTOLOADed to $wun->data->$key for lazy typers. #print 'XML source:'.$wun->xml if $wun->api_type eq 'xml'; print 'JSON source:'.$wun->json if $wun->api_type eq 'json'; Output:
Can't bless non-reference value at /usr/local/share/perl5/Hash/AsObject.pm line 82. Have you got any idea how I can fix it? Thanks in advance
|