NicoVideo/Content/MylistRSS.pm

filter: Statementstmt 81.2% 26 / 32 Branchbran 33.3% 2 / 6 Conditioncond 11.1% 1 / 9 MC/DCmcdc 0.0% 0 / 5 Subroutinesub 77.7% 7 / 9 Podpod 0.0% 0 / 3 totaltotal 56.2% 36 / 64 CC 7 SCAR 19.6
CC
7
Cov
62%
is_closed
20.0
parse
4.7
members
2.0
CRAP 7.1
« NicoVideo/Content/TagRSS.pm ↑ Summary NicoVideo/Response/Video.pm »
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
BranchTrueFalseTotal
if defined $_[0] 0 1 1
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
BranchTrueFalseTotal
if (ref $self->_component and $self->_component->isa('XML::FeedPP')) { } 1 0 1
Condition33%1/3
ref $self->_component and $self->_component->isa("XML::FeedPP")
!ll&&!rl&&r
001
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")
ABresult
0X0
100
111
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
BranchTrueFalseTotal
if ($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}") 0 0 0
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}"
!ll&&!rl&&r
000
$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/"
!ll&&!rl&&r
000
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}"
ABCresult
0XX0
10X0
1100
1111
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__
« NicoVideo/Content/TagRSS.pm ↑ Summary NicoVideo/Response/Video.pm »