summaryrefslogtreecommitdiff
path: root/lib/Feed/Printer.pm
blob: 89dd93fd239cf9972d4047298394222d07298d2f (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::Printer; 
use Moose::Role;
use 5.016;
use namespace::autoclean;
 
requires 'process';
 
before process => sub {
    my ($self) = @_;
 
    say $self->feed->title;
};
 
sub process_entry {
    my ($self,$entry) = @_;
 
    $self->log->trace('process_entry - begin');
 
    for my $f (qw(id author title link issued modified)) {
        say "  $f:",$entry->$f//'<undef>';
    }
    say $entry->content->body;
    say '';
 
    $self->log->trace('process_entry - end');
}
 
1;