Net::Google::AuthSub::Response - a response from a Net::Google::AuthSub request
my $response = $auth->login($user, $pass); if ($response->is_success) { print "Yay!\n"; } else { if ($response->error eq 'CaptchaRequired') { print "Captcha Image ".$response->captchaurl; } }
HTTP::Response
base url
Create a new response.
Returns whether the response was a sucess or not.
Methods available if the response was a success.
The authorisation token if the response is a success.
Not used yet.
Methods available if the response was an error.
The error code. Can be one of
The login request used a username or password that is not recognized.
The account email address has not been verified. The user will need to access their Google account directly to resolve the issue before logging in using a non-Google application.
The user has not agreed to terms. The user will need to access their Google account directly to resolve the issue before logging in using a non-Google application.
A CAPTCHA is required. (A response with this error code will also contain an image URL and a CAPTCHA token.)
The error is unknown or unspecified; the request contained invalid input or was malformed.
The user account has been deleted.
The user account has been disabled.
The user's access to the specified service has been disabled. (The user account may still be valid.)
The service is not available; try again later.
The url of a page describing the error.
The token required to authenticate a captcha.
The full url of the captcha image.
To install Net::Google::AuthSub, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::Google::AuthSub
CPAN shell
perl -MCPAN -e shell install Net::Google::AuthSub
For more information on module installation, please visit the detailed CPAN module installation guide.