Skip Menu |

This queue is for tickets about the Net-Twitter-OAuth CPAN distribution.

Report information
The Basics
Id: 46414
Status: resolved
Priority: 0/
Queue: Net-Twitter-OAuth

People
Owner: Nobody in particular
Requestors: chris [...] oak-wood.co.uk
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.05
Fixed in: (no value)



The API is not consistent with Net::Twitter with respect to error handling. A failed update in Net::Twitter returns false, the nature of the error can then be ascertained with get_error, http_message or http_code. With Net::Twitter::OAuth the whole thing throws an exception. This appears to be due to Net::OAuth::Simple making extensive use of 'die', rather than returning false. A work around for Net::Twitter::OAuth would be to wrap make_restricted_request calls in eval{} in Net::Twitter::OAuth::UserAgent::get and Net::Twitter::OAuth::UserAgent::post, and then attempt to parse $@ and do something useful with the results (eg set Net::Twitter::Error).
This module is now part of Net::Twitter itself. Closing.