TaskPipe/PathSettings/Global.pm

filter: Statementstmt 96.6% 29 / 30 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 83.3% 5 / 6 Podpod 0.0% 0 / 1 totaltotal 91.8% 34 / 37 CC 1 SCAR 1.5
CC
1
Cov
97%
module_path
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« TaskPipe/Plan.pm ↑ Summary TaskPipe/Iterator.pm »
1 package TaskPipe::PathSettings::Global;
2  
3 42 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 42 ▶use Moose::Util::TypeConstraints;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 42 ▶use Cwd 'abs_path';
Subroutine BEGIN: called CC=1 SCAR=0.0
6 42 ▶use File::Path::Expand;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 42 with 'MooseX::ConfigCascade';
8  
9  
10 0 ▶sub module_path{ return +abs_path(__FILE__) }
Subroutine module_path: not called CC=1 SCAR=6.9
Pod undocumented
11  
12 =head1 NAME
13  
14 TaskPipe::PathSettings::Global - TaskPipe global path settings
15  
16 =head1 METHODS
17  
18 =over
19  
20 =item global_conf_filename
21  
22 The name of the taskpipe global configuration file. This file that contains global settings that you will commonly need to review and change.
23  
24 =cut
25  
26 42 has global_conf_filename => (is => 'ro', isa => 'Str', default => 'global.yml');
27  
28  
29 =item system_conf_filename
30  
31 The name of the taskpipe system configuration file. Like the file named in the parameter C<global_conf_filename>, this file contains global settings. However, these may be settings you are less likely to want to change - such as taskpipe command line tool settings. Modify this file only if you are sure you understand the consequences.
32  
33 =cut
34  
35 42 has system_conf_filename => (is => 'ro', isa => 'Str', default => 'system.yml');
36  
37  
38 =item home_filename
39  
40 The name of the file in the user's home dir to use to store the taskpipe root directory. During setup, this value can be overwritten (ie the module TaskPipe::PathSettings::Global is edited in place)
41  
42 =cut
43  
44 42 has home_filename => (is => 'ro', isa => 'Str', default => '.taskpipe');
45  
46  
47  
48 =item default_home_filename
49  
50 The default value for the home filename in case home_filename needs restoring to the factory default
51  
52 =cut
53  
54 42 has default_home_filename => (is => 'ro', isa => 'Str', default => '.taskpipe');
55  
56  
57  
58 =item root_dir
59  
60 The taskpipe root directory. This is normally set from the file found in your home directory (see C<home_filename>), if it is not explicitly provided.
61  
62 =cut
63  
64 7507 ▶has root_dir => (is => 'ro', isa => 'Str', trigger => sub { $_[0]->{root_dir} = expand_filename( $_[1] ) });
Subroutine __ANON__: called CC=1 SCAR=0.0
65  
66  
67 =item project_dir
68  
69 The directory inside the root where projects will be stored
70  
71 =cut
72  
73 42 has project_dir => (is => 'ro', isa => 'Str', default => '/projects');
74  
75  
76 =item global_dir
77  
78 The directory inside the root where global subdirectories and files will be stored
79  
80 =cut
81  
82 42 has global_dir => (is => 'ro', isa => 'Str', default => '/global');
83  
84  
85 =item global_conf_dir
86  
87 The directory inside the global_dir where the global config files will be stored.
88  
89 =cut
90  
91 42 has global_conf_dir => (is => 'ro', isa => 'Str', default => '/conf');
92  
93  
94 =item global_lib_dir
95  
96 The directory inside the global_dir where global library files (ie perl packages) will be stored
97  
98 =cut
99  
100 42 has global_lib_dir => (is => 'ro', isa => 'Str', default => '/lib');
101  
102  
103 =item global_log_dir
104  
105 The directory inside the global_dir where global log files will be stored
106  
107 =cut
108  
109 42 has global_log_dir => (is => 'ro', isa => 'Str', default => '/logs');
110  
111  
112  
113 =item project
114  
115 The default project which will be used if the C<--project> parameter is omitted when running C<taskpipe> commands
116  
117 =cut
118  
119 42 has project => (is => 'ro', isa => 'Str', default => 'default_project');
120  
121  
122  
123 =item conf_dir
124  
125 The directory name inside every project where C<taskpipe> will look for the project-specific config file
126  
127 =cut
128  
129 42 has conf_dir => (is => 'ro', isa => 'Str', default => '/conf');
130  
131  
132  
133 =item conf_filename
134  
135 The name of the file inside every project conf_dir which C<taskpipe> will load for project-specific config
136  
137 =back
138  
139 =cut
140  
141 42 has conf_filename => (is => 'ro', isa => 'Str', default => 'project.yml');
142  
143 =head1 AUTHOR
144  
145 Tom Gracey <tomgracey@gmail.com>
146  
147 =head1 COPYRIGHT AND LICENSE
148  
149 Copyright (c) Tom Gracey 2018
150  
151 TaskPipe is free software, licensed under
152  
153 The GNU Public License Version 3
154  
155 =cut
156  
157 42 __PACKAGE__->meta->make_immutable;
158 42 1;
159 __END__
« TaskPipe/Plan.pm ↑ Summary TaskPipe/Iterator.pm »