WebService/TDWTF/Article.pm

filter: Statementstmt 68.7% 22 / 32 Branchbran 50.0% 1 / 2 Conditioncond 75.0% 3 / 4 MC/DCmcdc 50.0% 1 / 2 Subroutinesub 52.9% 9 / 17 Podpod 100% 11 / 11 totaltotal 69.1% 47 / 68 CC 5 SCAR 7.1
CC
5
Cov
68%
Body
4.1
PreviousArticle
2.1
AuthorName
2.0
CRAP 2.0
« WebService/TDWTF.pm ↑ Summary
1 package WebService::TDWTF::Article;
2  
3 2 ▶use 5.014000;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 2 ▶use parent qw/Class::Accessor::Fast/;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 2 our $VERSION = '0.003';
9  
10 2 ▶use WebService::TDWTF ();
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 2 ▶sub _article { goto &WebService::TDWTF::article }
Subroutine _article: called CC=1 SCAR=0.0
13  
14 2 __PACKAGE__->mk_ro_accessors(qw/Id Slug SummaryHtml BodyHtml FooterAdHtml Title CoalescedCommentCount DiscourseThreadUrl PublishedDate DisplayDate Url CommentsUrl PreviousArticleId PreviousArticleUrl NextArticleId NextArticleUrl/);
15  
16 0 ▶sub AuthorName { shift->{Author}->{Name} }
Subroutine AuthorName: not called CC=1 SCAR=6.9
Pod documented
17 0 ▶sub AuthorShortDescription { shift->{Author}->{ShortDescription} }
Subroutine AuthorShortDescription: not called CC=1 SCAR=6.9
Pod documented
18 0 ▶sub AuthorDescriptionHtml { shift->{Author}->{DescriptionHtml} }
Subroutine AuthorDescriptionHtml: not called CC=1 SCAR=6.9
Pod documented
19 0 ▶sub AuthorSlug { shift->{Author}->{Slug} }
Subroutine AuthorSlug: not called CC=1 SCAR=6.9
Pod documented
20 0 ▶sub AuthorImageUrl { shift->{Author}->{ImageUrl} }
Subroutine AuthorImageUrl: not called CC=1 SCAR=6.9
Pod documented
21  
22 0 ▶sub SeriesSlug { shift->{Series}->{Slug} }
Subroutine SeriesSlug: not called CC=1 SCAR=6.9
Pod documented
23 0 ▶sub SeriesTitle { shift->{Series}->{Title} }
Subroutine SeriesTitle: not called CC=1 SCAR=6.9
Pod documented
24 0 ▶sub SeriesDescription { shift->{Series}->{Description} }
Subroutine SeriesDescription: not called CC=1 SCAR=6.9
Pod documented
25  
26 1 ▶sub PreviousArticle { _article shift->PreviousArticleId // return }
Subroutine PreviousArticle: called CC=2 SCAR=7.6
Pod documented
Condition50%1/2
(shift())->PreviousArticleId // (return)
l!l
10
MC/DC0%0/1
(shift())->PreviousArticleId // (return)
(shift())->PreviousArticleId
Truth table50%1/2
A
A= (shift())->PreviousArticleId
Aresult
11
00
27 2 ▶sub NextArticle { _article shift->NextArticleId // return }
Subroutine NextArticle: called CC=2 SCAR=6.9
Pod documented
Condition100%2/2
(shift())->NextArticleId // (return)
l!l
11
MC/DC100%1/1
(shift())->NextArticleId // (return)
(shift())->NextArticleId
Truth table100%2/2
A
A= (shift())->NextArticleId
Aresult
11
00
28  
29 2 ▶sub Body {
Subroutine Body: called CC=3 SCAR=14.2
Pod documented
30 2 ▶ unless ($_[0]->BodyHtml) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($_[0]->BodyHtml) 0 2 2
31 0 my $ret = _article $_[0]->Id, 1;
32 0 $_[0]->{$_} = $ret->{$_} for qw/BodyHtml FooterAdHtml/;
33 }
34 2 $_[0]->BodyHtml
35 }
36  
37 2 1;
38 __END__
« WebService/TDWTF.pm ↑ Summary