Feed.pm

filter: Statementstmt 95.8% 23 / 24 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 75.0% 3 / 4 Podpod n/a totaltotal 92.8% 26 / 28 CC 1 SCAR 0.3
CC
1
Cov
96%
__ANON__
1.1
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« FeedParser.pm ↑ Summary
1 package Search::OpenSearch::Feed;
2 2 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 2 ▶use Types::Standard qw( HashRef ArrayRef Int Str Num Maybe );
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 2 our $VERSION = '0.101';
7  
8 2 has 'entries' => ( is => 'rw', isa => ArrayRef );
9 2 has 'total' => ( is => 'rw', isa => Int );
10 2 has 'facets' => ( is => 'rw', isa => Maybe[HashRef] );
11 2 has 'page_size' => ( is => 'rw', isa => Int );
12 0 ▶has 'offset' => ( is => 'rw', isa => Int, default => sub {0} );
Subroutine __ANON__: not called CC=1 SCAR=1.2
13 2 has 'query' => ( is => 'rw', isa => Maybe[Str] );
14 2 has 'id' => ( is => 'rw', isa => Str );
15 2 has 'title' => ( is => 'rw', isa => Str );
16 2 has 'build_time' => ( is => 'rw', isa => Maybe[Num] );
17 2 has 'search_time' => ( is => 'rw', isa => Maybe[Num] );
18 2 has 'suggestions' => ( is => 'rw', isa => Maybe[HashRef] );
19 2 has 'updated' => ( is => 'rw', isa => Str );
20  
21 =head1 NAME
22  
23 Search::OpenSearch::Feed - client-side representation of a Search::OpenSearch::Response::XML
24  
25 =head1 SYNOPSIS
26  
27 my $feed = Search::OpenSearch::FeedParser->new->parse( $sos_response_xml );
28 printf("total: %s\n", $feed->total);
29 for my $entry (@{ $feed->entries }) {
30 printf(" uri: %s\n", $entry->{uri});
31 }
32  
33 =head1 DESCRIPTION
34  
35 Search::OpenSearch::Feed represents the parsed response from Search::OpenSearch::Response::XML.
36 See L<Search::OpenSearch::FeedParser>.
37  
38 =head1 METHODS
39  
40 The following attributes are available:
41  
42 =head2 entries
43  
44 =head2 total
45  
46 =head2 facets
47  
48 =head2 page_size
49  
50 =head2 offset
51  
52 =head2 query
53  
54 =head2 id
55  
56 =head2 title
57  
58 =head2 build_time
59  
60 =head2 search_time
61  
62 =head2 suggestions
63  
64 =head2 updated
65  
66 =cut
67  
68 2 1;
69  
70 __END__
« FeedParser.pm ↑ Summary