Subject: | Incorrect error handling |
Hello, just noticed this piece of code: return "Error: $!" unless
$response->is_success; it sould be return "Error: " . $response-
Show quoted text
>status_line unless $response->is_success; because LWP::UserAgent does
not set the $! variable. Personally I would recommend adding an error()
method to do error checking and on unsuccessful $response return undef
and set the error.
Cheers.