line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package WebService::GData::Node::Media::GroupEntity; |
2
|
6
|
|
|
6
|
|
742
|
use base 'WebService::GData::Node::AbstractEntity'; |
|
6
|
|
|
|
|
16
|
|
|
6
|
|
|
|
|
7438
|
|
3
|
6
|
|
|
6
|
|
3841
|
use WebService::GData::Node::Media::Group(); |
|
6
|
|
|
|
|
17
|
|
|
6
|
|
|
|
|
116
|
|
4
|
6
|
|
|
6
|
|
3565
|
use WebService::GData::Node::Media::Category(); |
|
6
|
|
|
|
|
21
|
|
|
6
|
|
|
|
|
113
|
|
5
|
6
|
|
|
6
|
|
3313
|
use WebService::GData::Node::Media::Content(); |
|
6
|
|
|
|
|
15
|
|
|
6
|
|
|
|
|
139
|
|
6
|
6
|
|
|
6
|
|
6049
|
use WebService::GData::Node::Media::Credit(); |
|
6
|
|
|
|
|
17
|
|
|
6
|
|
|
|
|
113
|
|
7
|
6
|
|
|
6
|
|
4087
|
use WebService::GData::Node::Media::Description(); |
|
6
|
|
|
|
|
17
|
|
|
6
|
|
|
|
|
123
|
|
8
|
6
|
|
|
6
|
|
3742
|
use WebService::GData::Node::Media::Keywords(); |
|
6
|
|
|
|
|
52
|
|
|
6
|
|
|
|
|
121
|
|
9
|
6
|
|
|
6
|
|
6121
|
use WebService::GData::Node::Media::Player(); |
|
6
|
|
|
|
|
19
|
|
|
6
|
|
|
|
|
126
|
|
10
|
6
|
|
|
6
|
|
4383
|
use WebService::GData::Node::Media::Title(); |
|
6
|
|
|
|
|
20
|
|
|
6
|
|
|
|
|
122
|
|
11
|
6
|
|
|
6
|
|
4097
|
use WebService::GData::Node::Media::Thumbnail(); |
|
6
|
|
|
|
|
18
|
|
|
6
|
|
|
|
|
126
|
|
12
|
6
|
|
|
6
|
|
4182
|
use WebService::GData::Node::Media::Restriction(); |
|
6
|
|
|
|
|
18
|
|
|
6
|
|
|
|
|
125
|
|
13
|
6
|
|
|
6
|
|
709
|
use WebService::GData::Node::PointEntity(); |
|
6
|
|
|
|
|
15
|
|
|
6
|
|
|
|
|
105
|
|
14
|
6
|
|
|
6
|
|
37
|
use WebService::GData::Collection(); |
|
6
|
|
|
|
|
97
|
|
|
6
|
|
|
|
|
2777
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
our $VERSION = 0.01_02; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
my $collections = [qw(category restriction thumbnail credit content)]; |
19
|
|
|
|
|
|
|
my $nodes = [qw(player title description keywords)]; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub __init { |
22
|
3
|
|
|
3
|
|
8
|
my ($this,$params) = @_; |
23
|
|
|
|
|
|
|
|
24
|
3
|
|
|
|
|
53
|
$this->_entity(new WebService::GData::Node::Media::Group()); |
25
|
3
|
|
|
|
|
11
|
foreach my $node (@$collections){ |
26
|
15
|
|
|
|
|
50
|
$this->{'_'.$node}= $this->__node_factory($node,$params,1); |
27
|
15
|
|
|
|
|
51
|
$this->_entity->child($this->{'_'.$node}); |
28
|
|
|
|
|
|
|
} |
29
|
3
|
|
|
|
|
10
|
foreach my $node (@$nodes){ |
30
|
12
|
|
|
|
|
30
|
$this->{'_'.$node}= $this->__node_factory($node,$params); |
31
|
12
|
|
|
|
|
40
|
$this->_entity->child($this->{'_'.$node}); |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
sub __node_factory { |
36
|
27
|
|
|
27
|
|
46
|
my($this,$node,$params,$collection)=@_; |
37
|
27
|
|
|
|
|
67
|
my $class = 'WebService::GData::Node::Media::'."\u$node"; |
38
|
27
|
|
|
|
|
54
|
my $data = $params->{'media$'.$node}; |
39
|
27
|
100
|
100
|
|
|
128
|
if(ref($data) eq 'ARRAY' || $collection) { |
40
|
|
|
|
|
|
|
return new WebService::GData::Collection($data||[],undef,sub { |
41
|
8
|
|
|
8
|
|
17
|
my $elm=shift; |
42
|
8
|
100
|
|
|
|
99
|
$elm= $class->new($elm) if ref $elm ne $class; |
43
|
8
|
|
|
|
|
31
|
return $elm; |
44
|
15
|
|
100
|
|
|
133
|
}); |
45
|
|
|
|
|
|
|
} |
46
|
12
|
|
|
|
|
154
|
return $class->new($data); |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
sub _create_onget_init { |
50
|
0
|
|
|
0
|
|
|
my($class)=shift; |
51
|
0
|
|
|
|
|
|
my $sub = qq[sub { my \$elm=shift; return $class->new(\$elm) if ref \$elm ne '$class' }]; |
52
|
0
|
|
|
|
|
|
return eval "$sub"; |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
} |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
1; |
59
|
|
|
|
|
|
|
|