line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package WebService::GData::YouTube::Feed::VideoMessage; |
2
|
|
|
|
|
|
|
|
3
|
3
|
|
|
3
|
|
26929
|
use WebService::GData; |
|
3
|
|
|
|
|
9
|
|
|
3
|
|
|
|
|
19
|
|
4
|
3
|
|
|
3
|
|
18
|
use base 'WebService::GData::YouTube::Feed::Video'; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
1185
|
|
5
|
3
|
|
|
3
|
|
19
|
use WebService::GData::Constants qw(:all); |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
1415
|
|
6
|
3
|
|
|
3
|
|
22
|
use WebService::GData::YouTube::Constants qw(:all); |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
2127
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our $VERSION = 0.01_01; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
our $BASE_URI = BASE_URI . PROJECTION . '/users/default/inbox'; |
11
|
|
|
|
|
|
|
if ( WebService::GData::YouTube::StagingServer->is_on ) { |
12
|
|
|
|
|
|
|
$BASE_URI = STAGING_BASE_URI . PROJECTION . '/users/default/inbox'; |
13
|
|
|
|
|
|
|
} |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub subject { |
16
|
0
|
|
|
0
|
1
|
|
my ( $this, $title ) = @_; |
17
|
0
|
0
|
|
|
|
|
$this->{_title}->text($title) if $title; |
18
|
0
|
|
|
|
|
|
return $this->{_title}->text; |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
#alias |
22
|
|
|
|
|
|
|
sub from { |
23
|
0
|
|
|
0
|
1
|
|
shift()->author->[0]; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
#alias |
27
|
|
|
|
|
|
|
sub sent { |
28
|
0
|
|
|
0
|
1
|
|
shift()->published; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub send { |
32
|
0
|
|
|
0
|
1
|
|
my ( $this, @contacts ) = @_; |
33
|
|
|
|
|
|
|
|
34
|
0
|
|
|
|
|
|
my $ret; |
35
|
0
|
0
|
|
|
|
|
if ( $this->id ) { |
36
|
0
|
|
|
|
|
|
my $content = XML_HEADER . $this->serialize; |
37
|
0
|
|
|
|
|
|
foreach my $contact (@contacts) { |
38
|
0
|
|
|
|
|
|
( my $uri = $BASE_URI ) =~ s/default/$contact/; |
39
|
0
|
|
|
|
|
|
$ret = $this->{_request}->insert( $uri, $content ); |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
} |
42
|
0
|
|
|
|
|
|
return $ret; |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
sub save { |
46
|
0
|
|
|
0
|
1
|
|
shift()->send(@_); |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
sub delete { |
50
|
0
|
|
|
0
|
1
|
|
my ( $this, $message_id ) = @_; |
51
|
0
|
|
|
|
|
|
my $uri; |
52
|
0
|
0
|
|
|
|
|
if ($message_id) { |
|
0
|
0
|
|
|
|
|
|
53
|
0
|
0
|
|
|
|
|
$uri = |
54
|
|
|
|
|
|
|
( $message_id =~ m/^http/ ) |
55
|
|
|
|
|
|
|
? $message_id |
56
|
|
|
|
|
|
|
: $BASE_URI . '/' . $message_id; |
57
|
|
|
|
|
|
|
} |
58
|
|
|
|
|
|
|
elsif ( @{ $this->links->rel('edit') } > 0 ) { |
59
|
0
|
|
|
|
|
|
$uri = $this->links->rel('edit')->[0]->href; |
60
|
|
|
|
|
|
|
} |
61
|
0
|
0
|
|
|
|
|
$this->{_request}->delete($uri) if $uri; |
62
|
|
|
|
|
|
|
} |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
"The earth is blue like an orange."; |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
__END__ |