WWW::Google::C2DM::Response - Response Object
my $res = WWW::Google::C2DM::Response->new( is_success => 1, code => 200, message => 'OK', http_response => $http_response_object, params => { ... }, );
WWW::Google::C2DM::Response is a WWW::Google::C2DM internal class.
Creates a new instance.
$res->is_success ? 1 : 0;
$res->is_error ? 1 : 0;
Alias of is_error().
is_error()
HTTP Response code.
say $res->code;
HTTP Response message.
say $res->message;
Return value is a string that contains the code() and message().
code()
message()
say $res->status_line; # eq say $res->code, ' ', $res->message;
Original HTTP Response object.
my $http_response = $res->http_response; say $http_response->as_string;
Alias of http_response().
http_response()
C2DM error code. SEE ALSO http://code.google.com/intl/ja/android/c2dm/#push
use WWW::Google::C2DM::Constants qw(:error_code); if ($res->error_code eq QuotaExceeded) { ... }
Response id parameter.
say $res->id;
Response parameters in HASHREF.
say $res->params->{id};
xaicron <xaicron@cpan.org>
Copyright 2011 - xaicron
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install WWW::Google::C2DM, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WWW::Google::C2DM
CPAN shell
perl -MCPAN -e shell install WWW::Google::C2DM
For more information on module installation, please visit the detailed CPAN module installation guide.