Data/Object/Category.pm

filter: Statementstmt 85.0% 17 / 20 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 80.0% 4 / 5 Podpod n/a totaltotal 81.4% 22 / 27 CC 2 SCAR 4.5
CC
2
Cov
82%
__ANON__
2.2
__ANON__
2.0
BEGIN
1.0
CRAP 1.6
« Data/Parser/Text.pm ↑ Summary Data/Parser/Table.pm »
1 package Feed::Data::Object::Category;
2  
3 6 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 6 extends 'Feed::Data::Object::Base';
5 6 ▶use HTML::Strip;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 6 our $VERSION = '0.01';
8  
9 has '+raw' => (
10 0 ▶ default => sub { [ ] },
Subroutine __ANON__: not called CC=1 SCAR=6.9
11 6 );
12  
13 has '+text' => (
14 default => sub {
15 2 ▶ my $hs = HTML::Strip->new();
Subroutine __ANON__: called CC=2 SCAR=7.9
16 2 my $content = shift->raw;
17 2 ▶ my $string = ref $content ? join ', ', grep { $hs->parse($_) } @{ $content } : $content;
Branch: 1 branch
BranchTrueFalseTotal
ref $content ? : 0 2 2
18 2 return $string;
19 }
20 6 );
21  
22 has 'json' => (
23 is => 'rw',
24 lazy => 1,
25 default => sub {
26 10 ▶ return shift->raw;
Subroutine __ANON__: called CC=1 SCAR=0.0
27 },
28 6 );
29  
30 6 1; # End of Feed::Data
« Data/Parser/Text.pm ↑ Summary Data/Parser/Table.pm »