| 1 | package TaskPipe::PathSettings::Project; | ||
| 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::PathSettings::Project - project path settings for TaskPipe | ||
| 9 | |||
| 10 | =head1 METHODS | ||
| 11 | |||
| 12 | =over | ||
| 13 | |||
| 14 | =item plan | ||
| 15 | |||
| 16 | The name of the plan to use | ||
| 17 | |||
| 18 | =cut | ||
| 19 | |||
| 20 | 40 | has plan => (is => 'rw', isa => 'Str', default => 'plan.yml'); | |
| 21 | |||
| 22 | |||
| 23 | =item task_identifier | ||
| 24 | |||
| 25 | Normally your task modules will have names in the format C<TaskPipe::Task_(task name)>. This means 'Task_' is identifying the module as a task module. In the unlikely event you need to use another identifier, you can set | ||
| 26 | C<task_identifier> to a new value. | ||
| 27 | |||
| 28 | =cut | ||
| 29 | |||
| 30 | 40 | has task_identifier => (is => 'ro', isa => 'Str', default => 'Task_'); | |
| 31 | |||
| 32 | |||
| 33 | =item task_module_prefix | ||
| 34 | |||
| 35 | Normally your task modules will have names in the format C<TaskPipe::Task_(task name)>. However, lots of modules start with C<TaskPipe>, and if you want to differentiate your project tasks from general TaskPipe tasks you can set C<task_module_prefix> to something else. For example, if you set C<task_module_prefix=MyProject>, then you would create packages with the name format C<MyProject::Task_(taskname)> instead of C<TaskPipe::Task_(taskname)> in your project C<lib> dir. | ||
| 36 | |||
| 37 | Note this does not necessarily prevent the potential for a namespace collision when running a plan. For example, if you are planning to use C<TaskPipe::Task_Record> then you should not create a C<MyProject::Task_Record> (unless you are intending to have C<MyProject::Task_Record> inherit from C<TaskPipe::Task_Record>). | ||
| 38 | |||
| 39 | =cut | ||
| 40 | |||
| 41 | 40 | has task_module_prefix => (is => 'ro', isa => 'Str', default => 'TaskPipe'); | |
| 42 | |||
| 43 | |||
| 44 | |||
| 45 | =item lib_dir | ||
| 46 | |||
| 47 | The directory inside the project root where TaskPipe will look for Task packages | ||
| 48 | |||
| 49 | =cut | ||
| 50 | |||
| 51 | 40 | has lib_dir => (is => 'ro', isa => 'Str', default => '/lib'); | |
| 52 | |||
| 53 | |||
| 54 | |||
| 55 | =item plan_dir | ||
| 56 | |||
| 57 | The directory inside the project root where TaskPipe will look for plans | ||
| 58 | |||
| 59 | =cut | ||
| 60 | |||
| 61 | 40 | has plan_dir => (is => 'rw', isa => 'Str', default => '/plans'); | |
| 62 | |||
| 63 | |||
| 64 | |||
| 65 | =item source_dir | ||
| 66 | |||
| 67 | The directory inside the project root where TaskPipe will look for files to use as data sources | ||
| 68 | |||
| 69 | =cut | ||
| 70 | |||
| 71 | 40 | has source_dir => (is => 'ro', isa => 'Str', default => '/sources'); | |
| 72 | |||
| 73 | |||
| 74 | |||
| 75 | =item log_dir | ||
| 76 | |||
| 77 | The directory inside the project root to write log files | ||
| 78 | |||
| 79 | =back | ||
| 80 | |||
| 81 | =cut | ||
| 82 | |||
| 83 | 40 | has log_dir => (is => 'ro', isa => 'Str', default => '/logs'); | |
| 84 | |||
| 85 | =head1 AUTHOR | ||
| 86 | |||
| 87 | Tom Gracey <tomgracey@gmail.com> | ||
| 88 | |||
| 89 | =head1 COPYRIGHT AND LICENSE | ||
| 90 | |||
| 91 | Copyright (c) Tom Gracey 2018 | ||
| 92 | |||
| 93 | TaskPipe is free software, licensed under | ||
| 94 | |||
| 95 | The GNU Public License Version 3 | ||
| 96 | |||
| 97 | =cut | ||
| 98 | |||
| 99 | 40 | __PACKAGE__->meta->make_immutable; | |
| 100 | 40 | 1; | |
| 101 | __END__ | ||
| 102 | |||