File Coverage

blib/lib/Data/Riak/Fast/HTTP/Request.pm
Criterion Covered Total %
statement 9 9 100.0
branch n/a
condition n/a
subroutine 3 3 100.0
pod n/a
total 12 12 100.0


line stmt bran cond sub pod time code
1             package Data::Riak::Fast::HTTP::Request;
2              
3 22     22   122 use Mouse;
  22         42  
  22         152  
4              
5 22     22   8257 use HTTP::Headers::ActionPack::LinkList;
  22         1571  
  22         4285  
6              
7             has method => (
8             is => 'ro',
9             isa => 'Str',
10             default => 'GET'
11             );
12              
13             has uri => (
14             is => 'ro',
15             isa => 'Str',
16             required => 1
17             );
18              
19             has query => (
20             is => 'ro',
21             isa => 'HashRef',
22             predicate => 'has_query'
23             );
24              
25             has data => (
26             is => 'ro',
27             isa => 'Str',
28             default => ''
29             );
30              
31             has links => (
32             is => 'ro',
33             isa => 'HTTP::Headers::ActionPack::LinkList',
34             # TODO: make this coerce
35             default => sub {
36             return HTTP::Headers::ActionPack::LinkList->new;
37             }
38             );
39              
40             has indexes => (
41             is => 'ro',
42             isa => 'ArrayRef[HashRef]'
43             );
44              
45             has content_type => (
46             is => 'ro',
47             isa => 'Str',
48             default => 'text/plain'
49             );
50              
51             has accept => (
52             is => 'ro',
53             isa => 'Str',
54             default => '*/*'
55             );
56              
57             __PACKAGE__->meta->make_immutable;
58 22     22   113 no Mouse;
  22         51  
  22         114  
59              
60             1;
61              
62             __END__