Client/ResultSet.pm

filter: Statementstmt 92.3% 12 / 13 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 75.0% 3 / 4 Podpod n/a totaltotal 88.2% 15 / 17 CC 1 SCAR 2.2
CC
1
Cov
92%
__ANON__
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« Client/Container/Partuza.pm ↑ Summary Client/Resource.pm »
1 package Net::OpenSocial::Client::ResultSet;
2  
3 1 ▶use Any::Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use Any::Moose 'X::AttributeHelpers';
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 has 'results' => (
7 is => 'ro',
8 isa => 'HashRef',
9 0 ▶ default => sub { +{} },
Subroutine __ANON__: not called CC=1 SCAR=6.9
10 1 metaclass => 'Collection::Hash',
11 provides => {
12 set => 'set_result',
13 get => 'get_result',
14 },
15 );
16  
17 1 ▶no Any::Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
18 1 __PACKAGE__->meta->make_immutable;
19 1 1;
20  
21 =head1 NAME
22  
23 Net::OpenSocial::Client::ResultSet - Set of result
24  
25 =head1 SYNOPSIS
26  
27 my $result_set = Net::OpenSocial::Client::ResultSet->new;
28 $result_set->set_result( $request1_id => $result1 );
29 $result_set->set_result( $request2_id => $result2 );
30  
31 my $result = $result_set->get_result( $request1_id );
32 if ( $result->is_error ) {
33 ...
34 }
35 ...
36  
37 =head1 DESCRIPTION
38  
39 Set of result.
40  
41 =head1 METHODS
42  
43 =head2 results
44  
45 Hash reference that contains some of pairs of request-id and result.
46  
47 =head2 get_result( $request_id )
48  
49 Get the L<Net::OpenSocial::Client::Result> object for the request-id indicated.
50  
51 =head2 set_result( $request_id => $result )
52  
53 Set the L<Net::OpenSocial::Client::Result> object with request-id.
54  
55 =head1 SEE ALSO
56  
57 L<Net::OpenSocial::Client::Result>
58  
59 =head1 AUTHOR
60  
61 Lyo Kato, E<lt>lyo.kato@gmail.comE<gt>
62  
63 =head1 COPYRIGHT AND LICENSE
64  
65 Copyright (C) 2009 by Lyo Kato
66  
67 This library is free software; you can redistribute it and/or modify
68 it under the same terms as Perl itself, either Perl version 5.8.8 or,
69 at your option, any later version of Perl 5 you may have available.
70  
71 =cut
72  
« Client/Container/Partuza.pm ↑ Summary Client/Resource.pm »