line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::NicoVideo::Content::Watch; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
1526
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
38
|
|
4
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
30
|
|
5
|
1
|
|
|
1
|
|
5
|
use vars qw($VERSION); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
138
|
|
6
|
|
|
|
|
|
|
$VERSION = '0.28'; |
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
6
|
use base qw(Net::NicoVideo::Content Class::Accessor::Fast); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
128
|
|
9
|
1
|
|
|
1
|
|
6
|
use Carp qw(croak); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
149
|
|
10
|
|
|
|
|
|
|
|
11
|
1
|
|
|
1
|
|
6
|
use vars qw(@Members); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
232
|
|
12
|
|
|
|
|
|
|
@Members = qw( |
13
|
|
|
|
|
|
|
decoded_content |
14
|
|
|
|
|
|
|
); |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
__PACKAGE__->mk_accessors(@Members); |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub members { # implement |
19
|
0
|
|
|
0
|
0
|
|
my @copy = @Members; |
20
|
0
|
|
|
|
|
|
@copy; |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub parse { # implement |
24
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
25
|
0
|
0
|
|
|
|
|
$self->load($_[0]) if( defined $_[0] ); |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
# TODO - temporary return |
28
|
0
|
|
|
|
|
|
$self->decoded_content( $self->_decoded_content ); |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
# status |
31
|
0
|
0
|
|
|
|
|
if( $self->_decoded_content =~ m{\bhttps://secure.nicovideo.jp/secure/logout\b} ){ |
32
|
|
|
|
|
|
|
# when user is logging in, "watch" page produces full contents |
33
|
0
|
|
|
|
|
|
$self->set_status_success; |
34
|
|
|
|
|
|
|
}else{ |
35
|
|
|
|
|
|
|
# or user does not logged in, showing brief contents |
36
|
0
|
|
|
|
|
|
$self->set_status_error; |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
0
|
|
|
|
|
|
return $self; |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
1; |
44
|
|
|
|
|
|
|
__END__ |