line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Feed::Data::Object::Category; |
2
|
|
|
|
|
|
|
|
3
|
6
|
|
|
6
|
|
3674
|
use Moo; |
|
6
|
|
|
|
|
16
|
|
|
6
|
|
|
|
|
38
|
|
4
|
|
|
|
|
|
|
extends 'Feed::Data::Object::Base'; |
5
|
6
|
|
|
6
|
|
2881
|
use HTML::Strip; |
|
6
|
|
|
|
|
1277
|
|
|
6
|
|
|
|
|
62
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.01'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
has '+raw' => ( |
10
|
|
|
|
|
|
|
default => sub { [ ] }, |
11
|
|
|
|
|
|
|
); |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
has '+text' => ( |
14
|
|
|
|
|
|
|
default => sub { |
15
|
|
|
|
|
|
|
my $hs = HTML::Strip->new(); |
16
|
|
|
|
|
|
|
my $content = shift->raw; |
17
|
|
|
|
|
|
|
my $string = ref $content ? join ', ', grep { $hs->parse($_) } @{ $content } : $content; |
18
|
|
|
|
|
|
|
return $string; |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
); |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
has 'json' => ( |
23
|
|
|
|
|
|
|
is => 'rw', |
24
|
|
|
|
|
|
|
lazy => 1, |
25
|
|
|
|
|
|
|
default => sub { |
26
|
|
|
|
|
|
|
return shift->raw; |
27
|
|
|
|
|
|
|
}, |
28
|
|
|
|
|
|
|
); |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
1; # End of Feed::Data |