TaskPipe/UserAgentManager/UserAgentHandler/Settings.pm untested

filter: Statementstmt 0.0% 0 / 13 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 1 Podpod n/a totaltotal 0.0% 0 / 14 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
CRAP 2.0
1 package TaskPipe::UserAgentManager::UserAgentHandler::Settings;
2  
3 use Moose;
4  
5 with 'MooseX::ConfigCascade';
6  
7 =head1 NAME
8  
9 TaskPipe::UserAgentManager::UserAgentHandler::Settings
10  
11 =head1 DESCRIPTION
12  
13 Settings file for the TaskPipe::UserAgentManager::UserAgentHandler module
14  
15 =head1 METHODS
16  
17 =over
18  
19 =item agent
20  
21 The useragent string to use
22  
23 =cut
24  
25 has agent => (
26 is => 'ro',
27 isa => 'Str',
28 default => 'Mozilla/5.0 (Windows NT 6.1; rv:52.0) Gecko/20100101 Firefox/52.0'
29 );
30  
31  
32 =item timeout
33  
34 The request timeout
35  
36 =cut
37  
38 has timeout => (is => 'ro', isa => 'Int', default => 60 );
39  
40  
41 =item headers
42  
43 The headers to send with the request
44  
45 =cut
46  
47 has headers => (is => 'ro', isa => 'HashRef', default => sub{{
48 'Accept' => '*/*',
49 'Accept-Encoding' => "gzip deflate br",
50 'Accept-Language' => "en-USen;q=0.5",
51 'Connection' => "keep-alive"
52 }});
53  
54  
55 =item request_methods
56  
57 The methods this useragenthandler can handle
58  
59 =back
60  
61 =cut
62  
63 has request_methods => (is => 'ro', isa => 'ArrayRef', default => sub{[
64 'head',
65 'get',
66 'post',
67 'put'
68 ]});
69  
70 =head1 AUTHOR
71  
72 Tom Gracey <tomgracey@gmail.com>
73  
74 =head1 COPYRIGHT AND LICENSE
75  
76 Copyright (c) Tom Gracey 2018
77  
78 TaskPipe is free software, licensed under
79  
80 The GNU Public License Version 3
81  
82 =cut
83  
84  
85 __PACKAGE__->meta->make_immutable;
86 1;