TaskPipe/Task_Scrape/Settings.pm

filter: Statementstmt 100% 11 / 11 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 1 / 1 Podpod n/a totaltotal 100% 12 / 12 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
CRAP 1.0
« TaskPipe/TaskUtils/Settings.pm ↑ Summary TaskPipe/Template_Config_Global.pm »
1 package TaskPipe::Task_Scrape::Settings;
2  
3 40 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 40 with 'MooseX::ConfigCascade';
5  
6 =head1 NAME
7  
8 TaskPipe::Task_Scrape::Settings - settings for L<TaskPipe::Task_Scrape>
9  
10 =head1 METHODS
11  
12 =over
13  
14 =item max_retries
15  
16 The maximum number of times to retry if the request fails
17  
18 =cut
19  
20 40 has max_retries => (is => 'ro', isa => 'Int', default => 3);
21  
22 =item require_referer
23  
24 Exit with an error if set to 1 and no referer is provided (alongside url)
25  
26 =cut
27  
28 40 has require_referer => (is => 'ro', isa => 'Bool', default => 1);
29  
30  
31  
32 =item require_url
33  
34 Exit with an error if set to 1 and no url is provided. If set to zero and no url is provided, the task will return an empty list
35  
36 =cut
37  
38 40 has require_url => (is => 'ro', isa => 'Bool', default => 1);
39  
40  
41  
42 =item ua_mgr_module
43  
44 The UserAgentManager module to use
45  
46 =cut
47  
48 40 has ua_mgr_module => (is => 'ro', isa => 'Str', default => 'TaskPipe::UserAgentManager');
49  
50  
51 =item ua_handler_module
52  
53 The UserAgentHandler module to use
54  
55 =back
56  
57 =cut
58  
59 40 has ua_handler_module => (is => 'ro', isa => 'Str', default => 'TaskPipe::UserAgentManager::UserAgentHandler');
60  
61 =head1 AUTHOR
62  
63 Tom Gracey <tomgracey@gmail.com>
64  
65 =head1 COPYRIGHT AND LICENSE
66  
67 Copyright (c) Tom Gracey 2018
68  
69 TaskPipe is free software, licensed under
70  
71 The GNU Public License Version 3
72  
73 =cut
74  
75  
76 40 __PACKAGE__->meta->make_immutable;
77 40 1;
78 __END__
79  
« TaskPipe/TaskUtils/Settings.pm ↑ Summary TaskPipe/Template_Config_Global.pm »