Subject: | get_error() doesn't return a hashref |
Date: | Thu, 5 Feb 2009 14:29:20 -0800 |
To: | bug-Net-Twitter [...] rt.cpan.org |
From: | David Moreno <david [...] axiombox.com> |
The documentation states the following for the get_error method:
get_error
If the last request returned an error, the hashref containing the
error message can be retrieved with get_error. This will provide some
additional debugging information in addition to the http code and
message above.
However, a string with the serialized json is returned instead. Take
the following script to reproduce:
#!/usr/bin/env perl
use Net::Twitter 2.06;
use Data::Dumper;
my $t = Net::Twitter->new(
username => 'something',
password => 'fake',
);
$t->update(status => "mwahah!");
if($t->get_error) {
die Dumper $t->get_error;
}
Output:
$VAR1 = '{"request":"\\/statuses\\/update.json","error":"Could not
authenticate you."}';
Which is an scalar string, not a hash reference.
David Moreno
http://damog.net/