| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
# ABSTRACT: Constants used across the Pinto utilities |
|
2
|
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
package Pinto::Constants; |
|
4
|
|
|
|
|
|
|
|
|
5
|
66
|
|
|
66
|
|
407
|
use strict; |
|
|
66
|
|
|
|
|
141
|
|
|
|
66
|
|
|
|
|
2004
|
|
|
6
|
66
|
|
|
66
|
|
324
|
use warnings; |
|
|
66
|
|
|
|
|
123
|
|
|
|
66
|
|
|
|
|
1737
|
|
|
7
|
|
|
|
|
|
|
|
|
8
|
66
|
|
|
66
|
|
1067
|
use URI; |
|
|
66
|
|
|
|
|
8270
|
|
|
|
66
|
|
|
|
|
1136
|
|
|
9
|
66
|
|
|
66
|
|
8257
|
use Readonly; |
|
|
66
|
|
|
|
|
79525
|
|
|
|
66
|
|
|
|
|
3343
|
|
|
10
|
66
|
|
|
66
|
|
415
|
use Exporter qw(import); |
|
|
66
|
|
|
|
|
116
|
|
|
|
66
|
|
|
|
|
54682
|
|
|
11
|
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
#------------------------------------------------------------------------------ |
|
13
|
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
our $VERSION = '0.13'; # VERSION |
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
#------------------------------------------------------------------------------ |
|
17
|
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
Readonly our @EXPORT_OK => qw( |
|
19
|
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
$PINTO_SERVER_DEFAULT_PORT |
|
21
|
|
|
|
|
|
|
$PINTO_SERVER_DEFAULT_HOST |
|
22
|
|
|
|
|
|
|
$PINTO_SERVER_DEFAULT_ROOT |
|
23
|
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
$PINTO_PROTOCOL_VERSION |
|
25
|
|
|
|
|
|
|
$PINTO_PROTOCOL_STATUS_OK |
|
26
|
|
|
|
|
|
|
$PINTO_PROTOCOL_DIAG_PREFIX |
|
27
|
|
|
|
|
|
|
$PINTO_PROTOCOL_NULL_MESSAGE |
|
28
|
|
|
|
|
|
|
$PINTO_PROTOCOL_PROGRESS_MESSAGE |
|
29
|
|
|
|
|
|
|
$PINTO_PROTOCOL_ACCEPT |
|
30
|
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
$PINTO_DEFAULT_PALETTE |
|
32
|
|
|
|
|
|
|
$PINTO_PALETTE_COLOR_0 |
|
33
|
|
|
|
|
|
|
$PINTO_PALETTE_COLOR_1 |
|
34
|
|
|
|
|
|
|
$PINTO_PALETTE_COLOR_2 |
|
35
|
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
$PINTO_LOCK_TYPE_SHARED |
|
37
|
|
|
|
|
|
|
$PINTO_LOCK_TYPE_EXCLUSIVE |
|
38
|
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
$PINTO_STACK_NAME_ALL |
|
40
|
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
$PINTO_AUTHOR_REGEX |
|
42
|
|
|
|
|
|
|
$PINTO_USERNAME_REGEX |
|
43
|
|
|
|
|
|
|
$PINTO_STACK_NAME_REGEX |
|
44
|
|
|
|
|
|
|
$PINTO_PROPERTY_NAME_REGEX |
|
45
|
|
|
|
|
|
|
$PINTO_REVISION_ID_REGEX |
|
46
|
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
$PINTO_MINIMUM_CPANM_VERSION |
|
48
|
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
$PINTO_DIFF_STYLE_CONCISE |
|
50
|
|
|
|
|
|
|
$PINTO_DIFF_STYLE_DETAILED |
|
51
|
|
|
|
|
|
|
@PINTO_DIFF_STYLES |
|
52
|
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
$PINTO_STRATOPAN_CPAN_URI |
|
54
|
|
|
|
|
|
|
$PINTO_STRATOPAN_LOCATOR_URI |
|
55
|
|
|
|
|
|
|
$PINTO_BACKPAN_CPAN_URI |
|
56
|
|
|
|
|
|
|
@PINTO_DEFAULT_SOURCE_URIS |
|
57
|
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
@PINTO_PREREQ_PHASES |
|
59
|
|
|
|
|
|
|
@PINTO_PREREQ_RELATIONS |
|
60
|
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
@PINTO_ENVIRONMENT_VARIABLES |
|
62
|
|
|
|
|
|
|
); |
|
63
|
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
Readonly our %EXPORT_TAGS => ( |
|
65
|
|
|
|
|
|
|
all => \@EXPORT_OK, |
|
66
|
|
|
|
|
|
|
color => [ grep {m/PALETTE/x} @EXPORT_OK ], |
|
67
|
|
|
|
|
|
|
server => [ grep {m/SERVER/x} @EXPORT_OK ], |
|
68
|
|
|
|
|
|
|
protocol => [ grep {m/PROTOCOL/x} @EXPORT_OK ], |
|
69
|
|
|
|
|
|
|
regex => [ grep {m/REGEX/x} @EXPORT_OK ], |
|
70
|
|
|
|
|
|
|
lock => [ grep {m/LOCK/x} @EXPORT_OK ], |
|
71
|
|
|
|
|
|
|
diff => [ grep {m/DIFF/x} @EXPORT_OK ], |
|
72
|
|
|
|
|
|
|
prereq => [ grep {m/PREREQ/x} @EXPORT_OK ], |
|
73
|
|
|
|
|
|
|
stratopan => [ grep {m/STRATOPAN/x} @EXPORT_OK ], |
|
74
|
|
|
|
|
|
|
); |
|
75
|
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
#------------------------------------------------------------------------------ |
|
77
|
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
Readonly our $PINTO_SERVER_DEFAULT_HOST => 'localhost'; |
|
79
|
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
Readonly our $PINTO_SERVER_DEFAULT_PORT => 3111; |
|
81
|
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
Readonly our $PINTO_SERVER_DEFAULT_ROOT => "http://$PINTO_SERVER_DEFAULT_HOST:$PINTO_SERVER_DEFAULT_PORT"; |
|
83
|
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
#------------------------------------------------------------------------------ |
|
85
|
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
Readonly our $PINTO_PROTOCOL_VERSION => 1; |
|
87
|
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
Readonly our $PINTO_PROTOCOL_DIAG_PREFIX => '## '; |
|
89
|
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
Readonly our $PINTO_PROTOCOL_STATUS_OK => "${PINTO_PROTOCOL_DIAG_PREFIX}Status: ok"; |
|
91
|
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
Readonly our $PINTO_PROTOCOL_NULL_MESSAGE => "${PINTO_PROTOCOL_DIAG_PREFIX}-- ##"; |
|
93
|
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
Readonly our $PINTO_PROTOCOL_PROGRESS_MESSAGE => "${PINTO_PROTOCOL_DIAG_PREFIX}. ##"; |
|
95
|
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
Readonly our $PINTO_PROTOCOL_ACCEPT => "application/vnd.pinto.v${PINTO_PROTOCOL_VERSION}+text"; |
|
97
|
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
#------------------------------------------------------------------------------ |
|
99
|
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
Readonly our $PINTO_DEFAULT_PALETTE => [qw(green yellow red)]; |
|
101
|
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
Readonly our $PINTO_PALETTE_COLOR_0 => 0; |
|
103
|
|
|
|
|
|
|
Readonly our $PINTO_PALETTE_COLOR_1 => 1; |
|
104
|
|
|
|
|
|
|
Readonly our $PINTO_PALETTE_COLOR_2 => 2; |
|
105
|
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
#------------------------------------------------------------------------------ |
|
107
|
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
Readonly our $PINTO_LOCK_TYPE_SHARED => 'SH'; |
|
109
|
|
|
|
|
|
|
Readonly our $PINTO_LOCK_TYPE_EXCLUSIVE => 'EX'; |
|
110
|
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
#------------------------------------------------------------------------------ |
|
112
|
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
Readonly our $PINTO_STACK_NAME_ALL => '%'; |
|
114
|
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
#------------------------------------------------------------------------------ |
|
116
|
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
Readonly my $PINTO_ALPHANUMERIC_REGEX => qr{^ [a-zA-Z0-9-._]+ $}x; |
|
118
|
|
|
|
|
|
|
Readonly my $PINTO_HEXADECIMAL_UUID_REGEX => qr{^ [a-f0-9-]+ $}x; |
|
119
|
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
Readonly our $PINTO_AUTHOR_REGEX => qr/^ [A-Z]{2} [-A-Z0-9]* $/x; |
|
121
|
|
|
|
|
|
|
Readonly our $PINTO_USERNAME_REGEX => $PINTO_ALPHANUMERIC_REGEX; |
|
122
|
|
|
|
|
|
|
Readonly our $PINTO_STACK_NAME_REGEX => $PINTO_ALPHANUMERIC_REGEX; |
|
123
|
|
|
|
|
|
|
Readonly our $PINTO_PROPERTY_NAME_REGEX => $PINTO_ALPHANUMERIC_REGEX; |
|
124
|
|
|
|
|
|
|
Readonly our $PINTO_REVISION_ID_REGEX => $PINTO_HEXADECIMAL_UUID_REGEX; |
|
125
|
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
#------------------------------------------------------------------------------ |
|
127
|
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
Readonly our $PINTO_MINIMUM_CPANM_VERSION => '1.6920'; |
|
129
|
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
#------------------------------------------------------------------------------ |
|
131
|
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
Readonly our $PINTO_DIFF_STYLE_CONCISE => 'concise'; |
|
133
|
|
|
|
|
|
|
Readonly our $PINTO_DIFF_STYLE_DETAILED => 'detailed'; |
|
134
|
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
Readonly our @PINTO_DIFF_STYLES => ($PINTO_DIFF_STYLE_CONCISE, $PINTO_DIFF_STYLE_DETAILED); |
|
136
|
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
#------------------------------------------------------------------------------ |
|
138
|
|
|
|
|
|
|
# TODO: Make these configurable via ENV vars |
|
139
|
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
Readonly our $PINTO_PUBLIC_CPAN_URI => URI->new('http://www.cpan.org'); |
|
141
|
|
|
|
|
|
|
Readonly our $PINTO_BACKPAN_CPAN_URI => URI->new('http://backpan.perl.org'); |
|
142
|
|
|
|
|
|
|
Readonly our $PINTO_STRATOPAN_CPAN_URI => URI->new('http://cpan.stratopan.com'); |
|
143
|
|
|
|
|
|
|
Readonly our $PINTO_STRATOPAN_LOCATOR_URI => URI->new('http://meta.stratopan.com/locate'); |
|
144
|
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
Readonly our @PINTO_DEFAULT_SOURCE_URIS => ( $PINTO_STRATOPAN_CPAN_URI, |
|
146
|
|
|
|
|
|
|
$PINTO_PUBLIC_CPAN_URI, |
|
147
|
|
|
|
|
|
|
$PINTO_BACKPAN_CPAN_URI ); |
|
148
|
|
|
|
|
|
|
|
|
149
|
|
|
|
|
|
|
#------------------------------------------------------------------------------ |
|
150
|
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
Readonly our @PINTO_PREREQ_PHASES => qw(configure build test runtime develop); |
|
152
|
|
|
|
|
|
|
Readonly our @PINTO_PREREQ_RELATIONS => qw(requires suggests recommends); |
|
153
|
|
|
|
|
|
|
|
|
154
|
|
|
|
|
|
|
#------------------------------------------------------------------------------ |
|
155
|
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
Readonly our @PINTO_ENVIRONMENT_VARIABLES => qw( |
|
157
|
|
|
|
|
|
|
PINTO_AUTHOR_ID |
|
158
|
|
|
|
|
|
|
PINTO_DEBUG |
|
159
|
|
|
|
|
|
|
PINTO_DIFF_STYLE |
|
160
|
|
|
|
|
|
|
PINTO_EDITOR |
|
161
|
|
|
|
|
|
|
PINTO_LOCKFILE_TIMEOUT |
|
162
|
|
|
|
|
|
|
PINTO_NO_COLOR |
|
163
|
|
|
|
|
|
|
PINTO_PAGER |
|
164
|
|
|
|
|
|
|
PINTO_PAGER_OPTIONS |
|
165
|
|
|
|
|
|
|
PINTO_PALETTE |
|
166
|
|
|
|
|
|
|
PINTO_REPOSITORY_ROOT |
|
167
|
|
|
|
|
|
|
PINTO_STALE_LOCKFILE_TIMEOUT |
|
168
|
|
|
|
|
|
|
PINTO_USERNAME |
|
169
|
|
|
|
|
|
|
); |
|
170
|
|
|
|
|
|
|
|
|
171
|
|
|
|
|
|
|
#------------------------------------------------------------------------------ |
|
172
|
|
|
|
|
|
|
1; |
|
173
|
|
|
|
|
|
|
|
|
174
|
|
|
|
|
|
|
__END__ |
|
175
|
|
|
|
|
|
|
|
|
176
|
|
|
|
|
|
|
=pod |
|
177
|
|
|
|
|
|
|
|
|
178
|
|
|
|
|
|
|
=encoding UTF-8 |
|
179
|
|
|
|
|
|
|
|
|
180
|
|
|
|
|
|
|
=for :stopwords Jeffrey Ryan Thalhammer |
|
181
|
|
|
|
|
|
|
|
|
182
|
|
|
|
|
|
|
=head1 NAME |
|
183
|
|
|
|
|
|
|
|
|
184
|
|
|
|
|
|
|
Pinto::Constants - Constants used across the Pinto utilities |
|
185
|
|
|
|
|
|
|
|
|
186
|
|
|
|
|
|
|
=head1 VERSION |
|
187
|
|
|
|
|
|
|
|
|
188
|
|
|
|
|
|
|
version 0.13 |
|
189
|
|
|
|
|
|
|
|
|
190
|
|
|
|
|
|
|
=head1 AUTHOR |
|
191
|
|
|
|
|
|
|
|
|
192
|
|
|
|
|
|
|
Jeffrey Ryan Thalhammer <jeff@stratopan.com> |
|
193
|
|
|
|
|
|
|
|
|
194
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
|
195
|
|
|
|
|
|
|
|
|
196
|
|
|
|
|
|
|
This software is copyright (c) 2015 by Jeffrey Ryan Thalhammer. |
|
197
|
|
|
|
|
|
|
|
|
198
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
|
199
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
|
200
|
|
|
|
|
|
|
|
|
201
|
|
|
|
|
|
|
=cut |