Data/Object/Base.pm untested

filter: Statementstmt 0.0% 0 / 22 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 5 Podpod n/a totaltotal 0.0% 0 / 27 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 package Feed::Data::Object::Base;
2  
3 use Moo;
4 use Feed::Data::Object;
5 use HTML::Strip;
6 use Encode qw(encode_utf8);
7 use Types::Standard qw/Undef Str/;
8  
9 has 'raw' => (
10 is => 'rw',
11 lazy => 1,
12 isa => Str|Undef
13 );
14  
15 has 'text' => (
16 is => 'rw',
17 lazy => 1,
18 isa => Str,
19 default => sub {
20 my $hs = HTML::Strip->new();
21 my $string = $hs->parse(shift->raw);
22 return encode_utf8($string);
23 },
24 );
25  
26 has 'json' => (
27 is => 'rw',
28 lazy => 1,
29 isa => Str,
30 default => sub {
31 return shift->text;
32 },
33 );
34  
35 1;