| 1 | package Net::NicoVideo::Content::Watch; | ||||||||||
| 2 | |||||||||||
| 3 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 1 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 1 | ▶ | use vars qw($VERSION); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 1 | $VERSION = '0.28'; | |||||||||
| 7 | |||||||||||
| 8 | 1 | ▶ | use base qw(Net::NicoVideo::Content Class::Accessor::Fast); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | 1 | ▶ | use Carp qw(croak); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | |||||||||||
| 11 | 1 | ▶ | use vars qw(@Members); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 12 | 1 | @Members = qw( | |||||||||
| 13 | decoded_content | ||||||||||
| 14 | ); | ||||||||||
| 15 | |||||||||||
| 16 | 1 | __PACKAGE__->mk_accessors(@Members); | |||||||||
| 17 | |||||||||||
| 18 | 0 | ▶ | sub members { # implement | ||||||||
|
Subroutine
members: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 19 | 0 | my @copy = @Members; | |||||||||
| 20 | 0 | @copy; | |||||||||
| 21 | } | ||||||||||
| 22 | |||||||||||
| 23 | 0 | ▶ | sub parse { # implement | ||||||||
|
Subroutine
parse: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||
| 24 | 0 | my $self = shift; | |||||||||
| 25 | 0 | ▶ | $self->load($_[0]) if( defined $_[0] ); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 26 | |||||||||||
| 27 | # TODO - temporary return | ||||||||||
| 28 | 0 | $self->decoded_content( $self->_decoded_content ); | |||||||||
| 29 | |||||||||||
| 30 | # status | ||||||||||
| 31 | 0 | ▶ | if( $self->_decoded_content =~ m{\bhttps://secure.nicovideo.jp/secure/logout\b} ){ | ||||||||
|
Branch: 1 branch
| |||||||||||
| 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 | 1; | |||||||||
| 44 | __END__ | ||||||||||