line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Feed::Data::Object::Base; |
2
|
|
|
|
|
|
|
|
3
|
8
|
|
|
8
|
|
4114
|
use Moo; |
|
8
|
|
|
|
|
22
|
|
|
8
|
|
|
|
|
51
|
|
4
|
8
|
|
|
8
|
|
2905
|
use Feed::Data::Object; |
|
8
|
|
|
|
|
18
|
|
|
8
|
|
|
|
|
84
|
|
5
|
8
|
|
|
8
|
|
4059
|
use HTML::Strip; |
|
8
|
|
|
|
|
10251
|
|
|
8
|
|
|
|
|
86
|
|
6
|
8
|
|
|
8
|
|
306
|
use Encode qw(encode_utf8); |
|
8
|
|
|
|
|
19
|
|
|
8
|
|
|
|
|
794
|
|
7
|
8
|
|
|
8
|
|
62
|
use Types::Standard qw/Undef Str/; |
|
8
|
|
|
|
|
20
|
|
|
8
|
|
|
|
|
94
|
|
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; |