line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::OpenSocial::Client::Result; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
6
|
use Any::Moose; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
17
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
has 'is_error' => ( |
6
|
|
|
|
|
|
|
is => 'ro', |
7
|
|
|
|
|
|
|
isa => 'Bool', |
8
|
|
|
|
|
|
|
default => 0, |
9
|
|
|
|
|
|
|
); |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
has 'code' => ( |
12
|
|
|
|
|
|
|
is => 'ro', |
13
|
|
|
|
|
|
|
isa => 'Int', |
14
|
|
|
|
|
|
|
); |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
has 'message' => ( |
17
|
|
|
|
|
|
|
is => 'ro', |
18
|
|
|
|
|
|
|
isa => 'Str', |
19
|
|
|
|
|
|
|
); |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
has 'data' => ( is => 'ro', ); |
22
|
|
|
|
|
|
|
|
23
|
1
|
|
|
1
|
|
541
|
no Any::Moose; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
24
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
25
|
|
|
|
|
|
|
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 and its subclasses, |
63
|
|
|
|
|
|
|
and L. |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=head1 AUTHOR |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
Lyo Kato, Elyo.kato@gmail.comE |
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
|
|
|
|
|
|
|
|