line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::OpenSocial::Client::Resource::Factory; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
4
|
use Any::Moose; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
4
|
|
4
|
1
|
|
|
1
|
|
947
|
use Net::OpenSocial::Client::Type::Service qw(PEOPLE GROUP ACTIVITY APPDATA ALBUM MEDIAITEM); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
74
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
533
|
use Net::OpenSocial::Client::Resource::Person; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
8
|
|
7
|
1
|
|
|
1
|
|
529
|
use Net::OpenSocial::Client::Resource::Activity; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
8
|
|
8
|
1
|
|
|
1
|
|
505
|
use Net::OpenSocial::Client::Resource::AppData; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
8
|
|
9
|
1
|
|
|
1
|
|
547
|
use Net::OpenSocial::Client::Resource::Group; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
12
|
|
10
|
1
|
|
|
1
|
|
580
|
use Net::OpenSocial::Client::Resource::Album; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
9
|
|
11
|
1
|
|
|
1
|
|
497
|
use Net::OpenSocial::Client::Resource::MediaItem; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
8
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub gen_resource { |
14
|
0
|
|
|
0
|
1
|
|
my ( $class, $service, $data ) = @_; |
15
|
0
|
0
|
|
|
|
|
if ( $service eq PEOPLE ) { |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
16
|
0
|
|
|
|
|
|
return Net::OpenSocial::Client::Resource::Person->new( |
17
|
|
|
|
|
|
|
fields => $data ); |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
elsif ( $service eq GROUP ) { |
20
|
0
|
|
|
|
|
|
return Net::OpenSocial::Client::Resource::Group->new( |
21
|
|
|
|
|
|
|
fields => $data ); |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
elsif ( $service eq ACTIVITY ) { |
24
|
0
|
|
|
|
|
|
return Net::OpenSocial::Client::Resource::Activity->new( |
25
|
|
|
|
|
|
|
fields => $data ); |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
elsif ( $service eq APPDATA ) { |
28
|
0
|
|
|
|
|
|
return Net::OpenSocial::Client::Resource::AppData->new( |
29
|
|
|
|
|
|
|
fields => $data ); |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
elsif ( $service eq ALBUM ) { |
32
|
0
|
|
|
|
|
|
return Net::OpenSocial::Client::Resource::Album->new( |
33
|
|
|
|
|
|
|
fields => $data ); |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
elsif ( $service eq MEDIAITEM ) { |
36
|
0
|
|
|
|
|
|
return Net::OpenSocial::Client::Resource::MediaItem->new( |
37
|
|
|
|
|
|
|
fields => $data ); |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
1
|
|
|
1
|
|
234
|
no Any::Moose; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
4
|
|
42
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
43
|
|
|
|
|
|
|
1; |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head1 NAME |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
Net::OpenSocial::Client::Resource::Factory - resource factory |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head1 SYNOPSIS |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=head1 DESCRIPTION |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head1 METHODS |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head2 gen_resource |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head1 SEE ALSO |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
L |
60
|
|
|
|
|
|
|
L |
61
|
|
|
|
|
|
|
L |
62
|
|
|
|
|
|
|
L |
63
|
|
|
|
|
|
|
L |
64
|
|
|
|
|
|
|
L |
65
|
|
|
|
|
|
|
L |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=head1 AUTHOR |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
Lyo Kato, Elyo.kato@gmail.comE, OpenSocial 0.9 "album" and "mediaItem" |
70
|
|
|
|
|
|
|
services added by Eugene A.Lukianov, Eeugene.spa@gmail.comE |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
Copyright (C) 2009 by Lyo Kato |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or modify |
77
|
|
|
|
|
|
|
it under the same terms as Perl itself, either Perl version 5.8.8 or, |
78
|
|
|
|
|
|
|
at your option, any later version of Perl 5 you may have available. |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=cut |
81
|
|
|
|
|
|
|
|