| 1 | package TaskPipe::Plan::Settings; | ||
| 2 | |||
| 3 | 37 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 37 | with 'MooseX::ConfigCascade'; | |
| 5 | 37 | with 'TaskPipe::Role::MooseType_ShellMode'; | |
| 6 | 37 | with 'TaskPipe::Role::MooseType_IterateMode'; | |
| 7 | |||
| 8 | =head1 NAME | ||
| 9 | |||
| 10 | TaskPipe::Plan::Settings - settings for L<TaskPipe::Plan> | ||
| 11 | |||
| 12 | =head1 METHODS | ||
| 13 | |||
| 14 | =over | ||
| 15 | |||
| 16 | =item shell | ||
| 17 | |||
| 18 | Whether to run in the terminal or daemonize. Options are C<foreground> and C<background> | ||
| 19 | |||
| 20 | =cut | ||
| 21 | |||
| 22 | 37 | has shell => (is => 'ro', isa => 'ShellMode', default => 'foreground'); | |
| 23 | |||
| 24 | |||
| 25 | |||
| 26 | =item iterate | ||
| 27 | |||
| 28 | Choices are C<once> or C<repeat>. To kick off a daemon process that continually polls for open proxies, use C<--shell=background> together with C<--iterate=repeat> | ||
| 29 | |||
| 30 | =cut | ||
| 31 | |||
| 32 | 37 | has iterate => (is => 'ro', isa => 'IterateMode', default => 'once'); | |
| 33 | |||
| 34 | |||
| 35 | |||
| 36 | =item poll_interval | ||
| 37 | |||
| 38 | If --iterate=repeat then --poll_interval is the number of seconds to wait between iterations. --poll_interval is ignored if --iterate=once | ||
| 39 | |||
| 40 | =back | ||
| 41 | |||
| 42 | =cut | ||
| 43 | |||
| 44 | 37 | has poll_interval => (is => 'ro', isa => 'Int', default => 0); | |
| 45 | |||
| 46 | =head1 AUTHOR | ||
| 47 | |||
| 48 | Tom Gracey <tomgracey@gmail.com> | ||
| 49 | |||
| 50 | =head1 COPYRIGHT AND LICENSE | ||
| 51 | |||
| 52 | Copyright (c) Tom Gracey 2018 | ||
| 53 | |||
| 54 | TaskPipe is free software, licensed under | ||
| 55 | |||
| 56 | The GNU Public License Version 3 | ||
| 57 | |||
| 58 | =cut | ||
| 59 | |||
| 60 | 37 | __PACKAGE__->meta->make_immutable; | |
| 61 | 37 | 1; | |