line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Feed::Data::Object::Base; |
2
|
|
|
|
|
|
|
|
3
|
7
|
|
|
7
|
|
3590
|
use Moo; |
|
7
|
|
|
|
|
17
|
|
|
7
|
|
|
|
|
43
|
|
4
|
7
|
|
|
7
|
|
2511
|
use Feed::Data::Object; |
|
7
|
|
|
|
|
19
|
|
|
7
|
|
|
|
|
69
|
|
5
|
7
|
|
|
7
|
|
3705
|
use HTML::Strip; |
|
7
|
|
|
|
|
9322
|
|
|
7
|
|
|
|
|
77
|
|
6
|
7
|
|
|
7
|
|
287
|
use Encode qw(encode_utf8); |
|
7
|
|
|
|
|
13
|
|
|
7
|
|
|
|
|
763
|
|
7
|
7
|
|
|
7
|
|
61
|
use Types::Standard qw/Undef Str/; |
|
7
|
|
|
|
|
16
|
|
|
7
|
|
|
|
|
83
|
|
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; |