| 1 | package Net::NicoVideo::Content::MylistRSS; | ||||||||||||||||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||||||||||||||||
| 3 | 2 | ▶ | use strict; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 4 | 2 | ▶ | use warnings; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 5 | 2 | ▶ | use utf8; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 6 | 2 | ▶ | use vars qw($VERSION); | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 7 | 2 | $VERSION = '0.28'; | |||||||||||||||||||||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||||||||||||||||||||
| 9 | # NOTE: Never inherit with classes that have "get()" or "set()", like Class::Accessor::Fast, | ||||||||||||||||||||||||||||||||||||||||||
| 10 | # because these interfere with _component which is decorated with Net::NicoVideo::Decorator, like XML::FeedPP. | ||||||||||||||||||||||||||||||||||||||||||
| 11 | 2 | ▶ | use base qw(Net::NicoVideo::Content Net::NicoVideo::Decorator); | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 12 | 2 | ▶ | use XML::FeedPP; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 13 | |||||||||||||||||||||||||||||||||||||||||||
| 14 | 0 | ▶ | sub members { # implement | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
members: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 15 | 0 | (); | |||||||||||||||||||||||||||||||||||||||||
| 16 | } | ||||||||||||||||||||||||||||||||||||||||||
| 17 | |||||||||||||||||||||||||||||||||||||||||||
| 18 | 1 | ▶ | sub parse { # implement | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
parse: called CC=4 SCAR=15.5
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 19 | 1 | my $self = shift; | |||||||||||||||||||||||||||||||||||||||||
| 20 | 1 | ▶ | $self->load($_[0]) if( defined $_[0] ); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 21 | 1 | $self->_component( XML::FeedPP->new($self->_decoded_content) ); | |||||||||||||||||||||||||||||||||||||||||
| 22 | |||||||||||||||||||||||||||||||||||||||||||
| 23 | # status | ||||||||||||||||||||||||||||||||||||||||||
| 24 | 1 | ▶ | if( ref($self->_component) and $self->_component->isa('XML::FeedPP') ){ | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
ref $self->_component and $self->_component->isa("XML::FeedPP")
MC/DC0%0/2
ref $self->_component and $self->_component->isa("XML::FeedPP")
ref $self->_component
$self->_component->isa("XML::FeedPP")
Truth table33%1/3
A and B
A= ref $self->_componentB= $self->_component->isa("XML::FeedPP")
| |||||||||||||||||||||||||||||||||||||||||||
| 25 | 1 | $self->set_status_success; | |||||||||||||||||||||||||||||||||||||||||
| 26 | }else{ | ||||||||||||||||||||||||||||||||||||||||||
| 27 | 0 | $self->set_status_error; | |||||||||||||||||||||||||||||||||||||||||
| 28 | } | ||||||||||||||||||||||||||||||||||||||||||
| 29 | |||||||||||||||||||||||||||||||||||||||||||
| 30 | 1 | return $self; | |||||||||||||||||||||||||||||||||||||||||
| 31 | } | ||||||||||||||||||||||||||||||||||||||||||
| 32 | |||||||||||||||||||||||||||||||||||||||||||
| 33 | 0 | ▶ | sub is_closed { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
is_closed: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 34 | 0 | my $self = shift; | |||||||||||||||||||||||||||||||||||||||||
| 35 | 0 | ▶ | if( $self->title eq 'マイリスト‐ニコニコ動画' | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/6
$self->title eq "\x{30de}\x{30a4}\x{30ea}\x{30b9}\x{30c8}\x{2010}\x{30cb}\x{30b3}\x{30cb}\x{30b3}\x{52d5}\x{753b}" and $self->link eq "http://www.nicovideo.jp/" and $self->description eq "\x{3053}\x{306e}\x{30de}\x{30a4}\x{30ea}\x{30b9}\x{30c8}\x{306f}\x{975e}\x{516c}\x{958b}\x{306b}\x{8a2d}\x{5b9a}\x{3055}\x{308c}\x{3066}\x{3044}\x{307e}\x{3059}\x{3002}"
$self->title eq "\x{30de}\x{30a4}\x{30ea}\x{30b9}\x{30c8}\x{2010}\x{30cb}\x{30b3}\x{30cb}\x{30b3}\x{52d5}\x{753b}" and $self->link eq "http://www.nicovideo.jp/"
MC/DC0%0/3
$self->title eq "\x{30de}\x{30a4}\x{30ea}\x{30b9}\x{30c8}\x{2010}\x{30cb}\x{30b3}\x{30cb}\x{30b3}\x{52d5}\x{753b}" and $self->link eq "http://www.nicovideo.jp/" and $self->description eq "\x{3053}\x{306e}\x{30de}\x{30a4}\x{30ea}\x{30b9}\x{30c8}\x{306f}\x{975e}\x{516c}\x{958b}\x{306b}\x{8a2d}\x{5b9a}\x{3055}\x{308c}\x{3066}\x{3044}\x{307e}\x{3059}\x{3002}"
$self->title eq "\x{30de}\x{30a4}\x{30ea}\x{30b9}\x{30c8}\x{2010}\x{30cb}\x{30b3}\x{30cb}\x{30b3}\x{52d5}\x{753b}"
$self->link eq "http://www.nicovideo.jp/"
$self->description eq "\x{3053}\x{306e}\x{30de}\x{30a4}\x{30ea}\x{30b9}\x{30c8}\x{306f}\x{975e}\x{516c}\x{958b}\x{306b}\x{8a2d}\x{5b9a}\x{3055}\x{308c}\x{3066}\x{3044}\x{307e}\x{3059}\x{3002}"
Truth table0%0/4
A and B and C
A= $self->title eq "\x{30de}\x{30a4}\x{30ea}\x{30b9}\x{30c8}\x{2010}\x{30cb}\x{30b3}\x{30cb}\x{30b3}\x{52d5}\x{753b}"B= $self->link eq "http://www.nicovideo.jp/"C= $self->description eq "\x{3053}\x{306e}\x{30de}\x{30a4}\x{30ea}\x{30b9}\x{30c8}\x{306f}\x{975e}\x{516c}\x{958b}\x{306b}\x{8a2d}\x{5b9a}\x{3055}\x{308c}\x{3066}\x{3044}\x{307e}\x{3059}\x{3002}"
| |||||||||||||||||||||||||||||||||||||||||||
| 36 | and $self->link eq 'http://www.nicovideo.jp/' | ||||||||||||||||||||||||||||||||||||||||||
| 37 | and $self->description eq 'このマイリストは非公開に設定されています。' | ||||||||||||||||||||||||||||||||||||||||||
| 38 | ){ | ||||||||||||||||||||||||||||||||||||||||||
| 39 | 0 | return 1; | |||||||||||||||||||||||||||||||||||||||||
| 40 | } | ||||||||||||||||||||||||||||||||||||||||||
| 41 | 0 | return 0; | |||||||||||||||||||||||||||||||||||||||||
| 42 | } | ||||||||||||||||||||||||||||||||||||||||||
| 43 | |||||||||||||||||||||||||||||||||||||||||||
| 44 | |||||||||||||||||||||||||||||||||||||||||||
| 45 | 2 | 1; | |||||||||||||||||||||||||||||||||||||||||
| 46 | __END__ | ||||||||||||||||||||||||||||||||||||||||||