Skip Menu |

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

Report information
The Basics
Id: 46413
Status: resolved
Priority: 0/
Queue: Net-OAuth-Simple

Owner: Nobody in particular
Requestors: chris [...]

Bug Information
Severity: Normal
Broken in: 1.1
Fixed in: (no value)

Subject: Poor error handling
Download (untitled) / with headers
text/plain 511b
The extensive use of 'die' makes the module difficult to work with. For example, using 'die' in _make_request if the response is not successful is awkward. In a program that makes repeated calls, the failure of one is not necessarilly fatal. Having to wrap each request in an eval, and then parse a long and ugly $@ is awkward. An alternative would be to return undef, and provide a further method, or method, to allow details of the problem to be obtained, eg get_error(), http_code(), http_message() etc
Download (untitled) / with headers
text/plain 239b
The old "die" behaviour is still the default (for backwards compatibility) but there's a now an instantiation time option no_die_on_error which means that methods now return undef and the error is available in last_error(). Thanks! Simon

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to