blob: 0fc0a3a47aebc423146478a52dd62a47adaa6a3d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
package Feed::HelperRole::FeedEntry; use Moose::Role; use 5.012; use namespace::autoclean; requires 'content','summary','id','link','modified','issued'; sub unified_id { my ($self) = @_; return $self->id // $self->link // '<undef>'; } sub unified_date { my ($self) = @_; return $self->modified // $self->issued; } sub unified_content { my ($self) = @_; my $c = $self->content; return $c if $c->body; return $self->summary; } 1;
|