Data/Parser/Atom.pm untested

filter: Statementstmt 0.0% 0 / 21 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 6 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 31 CC 2 SCAR 11.5
CC
2
Cov
0%
get_value
6.0
BEGIN
2.0
BEGIN
2.0
CRAP 3.1
1 package Feed::Data::Parser::Atom;
2  
3 use Moo;
4 extends 'Feed::Data::Parser::Base';
5 use XML::Atom::Feed;
6 use Compiled::Params::OO qw/cpo/;
7 use Types::Standard qw/Object Str/;
8  
9 our $validate;
10 BEGIN {
11 $validate = cpo(
12 get_value => [Object, Object, Str],
13 );
14 }
15  
16 has '+parser' => (
17 default => sub {
18 my $self = shift;
19 return XML::Atom::Feed->new($self->content_ref);
20 }
21 );
22  
23 sub get_value {
24 my ($self, $item, $action) = $validate->get_value->(@_);
25
26 return $item->$action ? $item->$action : '';
27 }
28  
29 1; # End of Feed::Data