Subject: | Poor error handling |
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