line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Feed::Data::Object::Category; |
2
|
|
|
|
|
|
|
|
3
|
5
|
|
|
5
|
|
2984
|
use Moo; |
|
5
|
|
|
|
|
13
|
|
|
5
|
|
|
|
|
30
|
|
4
|
|
|
|
|
|
|
extends 'Feed::Data::Object::Base'; |
5
|
5
|
|
|
5
|
|
2471
|
use HTML::Strip; |
|
5
|
|
|
|
|
1233
|
|
|
5
|
|
|
|
|
46
|
|
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 |