Client/Result.pm

filter: Statementstmt 100% 12 / 12 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 2 / 2 Podpod n/a totaltotal 100% 14 / 14 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Client/Resource/Person.pm ↑ Summary Client/Type/Auth.pm »
1 package Net::OpenSocial::Client::Result;
2  
3 1 ▶use Any::Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 1 has 'is_error' => (
6 is => 'ro',
7 isa => 'Bool',
8 default => 0,
9 );
10  
11 1 has 'code' => (
12 is => 'ro',
13 isa => 'Int',
14 );
15  
16 1 has 'message' => (
17 is => 'ro',
18 isa => 'Str',
19 );
20  
21 1 has 'data' => ( is => 'ro', );
22  
23 1 ▶no Any::Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
24 1 __PACKAGE__->meta->make_immutable;
25 1 1;
26  
27 =head1 NAME
28  
29 Net::OpenSocial::Client::Result - Result of REST/RPC request
30  
31 =head1 SYNOPSIS
32  
33 my $result = $result_set->get_result( $request_id );
34 if ( $result->is_error ) {
35 say $result->code;
36 say $result->message;
37 } else {
38 my $data = $result->data;
39 }
40  
41 =head1 DESCRIPTION
42  
43 Result of REST/RPC request.
44  
45 =head1 METHODS
46  
47 =head2 is_error
48  
49 Boolean that represents if the request successfuly got response.
50  
51 =head2 code
52  
53 HTTP status code.
54  
55 =head2 message
56  
57 HTTP status message
58  
59 =head2 data
60  
61 Returns a resource or collection of resources.
62 See L<Net::OpenSocial::Client::Resource> and its subclasses,
63 and L<Net::OpenSocial::Client::Collection>.
64  
65 =head1 AUTHOR
66  
67 Lyo Kato, E<lt>lyo.kato@gmail.comE<gt>
68  
69 =head1 COPYRIGHT AND LICENSE
70  
71 Copyright (C) 2009 by Lyo Kato
72  
73 This library is free software; you can redistribute it and/or modify
74 it under the same terms as Perl itself, either Perl version 5.8.8 or,
75 at your option, any later version of Perl 5 you may have available.
76  
77 =cut
78  
« Client/Resource/Person.pm ↑ Summary Client/Type/Auth.pm »