line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::Gnats::Constants; |
2
|
41
|
|
|
41
|
|
23776
|
use strictures; |
|
41
|
|
|
|
|
48
|
|
|
41
|
|
|
|
|
171
|
|
3
|
|
|
|
|
|
|
BEGIN { |
4
|
41
|
|
|
41
|
|
3156
|
$Net::Gnats::Constants::VERSION = '0.20'; |
5
|
|
|
|
|
|
|
} |
6
|
41
|
|
|
41
|
|
176
|
use vars qw($VERSION); |
|
41
|
|
|
|
|
53
|
|
|
41
|
|
|
|
|
39329
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
require Exporter; |
9
|
|
|
|
|
|
|
our @ISA = qw(Exporter); |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our @EXPORT_OK = |
12
|
|
|
|
|
|
|
qw( CODE_GREETING CODE_CLOSING CODE_OK CODE_SEND_PR CODE_SEND_TEXT |
13
|
|
|
|
|
|
|
CODE_SEND_CHANGE_REASON |
14
|
|
|
|
|
|
|
CODE_NO_PRS_MATCHED CODE_NO_ADM_ENTRY CODE_PR_READY CODE_TEXT_READY |
15
|
|
|
|
|
|
|
CODE_INFORMATION CODE_INFORMATION_FILLER CODE_NONEXISTENT_PR |
16
|
|
|
|
|
|
|
CODE_EOF_PR CODE_UNREADABLE_PR CODE_INVALID_PR_CONTENTS |
17
|
|
|
|
|
|
|
CODE_INVALID_FIELD_NAME CODE_INVALID_ENUM CODE_INVALID_DATE |
18
|
|
|
|
|
|
|
CODE_INVALID_FIELD_CONTENTS CODE_INVALID_SEARCH_TYPE CODE_INVALID_EXPR |
19
|
|
|
|
|
|
|
CODE_INVALID_LIST CODE_INVALID_DATABASE CODE_INVALID_QUERY_FORMAT |
20
|
|
|
|
|
|
|
CODE_NO_KERBEROS CODE_AUTH_TYPE_UNSUP CODE_NO_ACCESS CODE_LOCKED_PR |
21
|
|
|
|
|
|
|
CODE_GNATS_LOCKED CODE_GNATS_NOT_LOCKED |
22
|
|
|
|
|
|
|
CODE_PR_NOT_LOCKED CODE_READONLY_FIELD |
23
|
|
|
|
|
|
|
CODE_INVALID_FTYPE_PROPERTY |
24
|
|
|
|
|
|
|
CODE_CMD_ERROR CODE_WRITE_PR_FAILED CODE_ERROR CODE_TIMEOUT |
25
|
|
|
|
|
|
|
CODE_NO_GLOBAL_CONFIG CODE_INVALID_GLOBAL_CONFIG CODE_NO_INDEX |
26
|
|
|
|
|
|
|
CODE_FILE_ERROR |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
SENDINCLUDE REASONCHANGE READONLY AUDITINCLUDE SENDREQUIRED |
29
|
|
|
|
|
|
|
REPLY_CONT REPLY_END RESTART_CHECK_THRESHOLD |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
CATEGORY_FIELD SYNOPSIS_FIELD SUBMITTER_ID_FIELD ORIGINATOR_FIELD |
32
|
|
|
|
|
|
|
AUDIT_TRAIL_FIELD RESPONSIBLE_FIELD LAST_MODIFIED_FIELD NUMBER_FIELD |
33
|
|
|
|
|
|
|
STATE_FIELD UNFORMATTED_FIELD RELEASE_FIELD |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
FROM_FIELD REPLYTO_FIELD TO_FIELD CC_FIELD SUBJECT_FIELD SENDPR_VER_FIELD |
36
|
|
|
|
|
|
|
NOTIFY_FIELD |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
CR LF CRLF DOT CONT |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
MAX_NEW_PRS); |
41
|
|
|
|
|
|
|
|
42
|
41
|
|
|
41
|
|
16618
|
BEGIN { |
43
|
|
|
|
|
|
|
sub CR () { "\015" } |
44
|
|
|
|
|
|
|
sub LF () { "\012" } |
45
|
|
|
|
|
|
|
sub CRLF () { "\015\012" } |
46
|
|
|
|
|
|
|
sub DOT () { '.' } |
47
|
|
|
|
|
|
|
sub CONT () { '-' } |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
# pcodes.h, gnats core |
50
|
|
|
|
|
|
|
sub CODE_GREETING () { 200 } |
51
|
|
|
|
|
|
|
sub CODE_CLOSING () { 201 } |
52
|
|
|
|
|
|
|
sub CODE_OK () { 210 } |
53
|
|
|
|
|
|
|
sub CODE_SEND_PR () { 211 } |
54
|
|
|
|
|
|
|
sub CODE_SEND_TEXT () { 212 } |
55
|
|
|
|
|
|
|
sub CODE_SEND_CHANGE_REASON () { 213 } |
56
|
|
|
|
|
|
|
sub CODE_NO_PRS_MATCHED () { 220 } |
57
|
|
|
|
|
|
|
sub CODE_NO_ADM_ENTRY () { 221 } |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
sub CODE_PR_READY () { 300 } |
60
|
|
|
|
|
|
|
sub CODE_TEXT_READY () { 301 } |
61
|
|
|
|
|
|
|
sub CODE_INFORMATION () { 350 } |
62
|
|
|
|
|
|
|
sub CODE_INFORMATION_FILLER () { 351 } |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
sub CODE_NONEXISTENT_PR () { 400 } |
65
|
|
|
|
|
|
|
sub CODE_EOF_PR () { 401 } |
66
|
|
|
|
|
|
|
sub CODE_UNREADABLE_PR () { 402 } |
67
|
|
|
|
|
|
|
sub CODE_INVALID_PR_CONTENTS () { 403 } |
68
|
|
|
|
|
|
|
sub CODE_INVALID_FIELD_NAME () { 410 } |
69
|
|
|
|
|
|
|
sub CODE_INVALID_ENUM () { 411 } |
70
|
|
|
|
|
|
|
sub CODE_INVALID_DATE () { 412 } |
71
|
|
|
|
|
|
|
sub CODE_INVALID_FIELD_CONTENTS () { 413 } |
72
|
|
|
|
|
|
|
sub CODE_INVALID_SEARCH_TYPE () { 414 } |
73
|
|
|
|
|
|
|
sub CODE_INVALID_EXPR () { 415 } |
74
|
|
|
|
|
|
|
sub CODE_INVALID_LIST () { 416 } |
75
|
|
|
|
|
|
|
sub CODE_INVALID_DATABASE () { 417 } |
76
|
|
|
|
|
|
|
sub CODE_INVALID_QUERY_FORMAT () { 418 } |
77
|
|
|
|
|
|
|
sub CODE_NO_KERBEROS () { 420 } |
78
|
|
|
|
|
|
|
sub CODE_AUTH_TYPE_UNSUP () { 421 } |
79
|
|
|
|
|
|
|
sub CODE_NO_ACCESS () { 422 } |
80
|
|
|
|
|
|
|
sub CODE_LOCKED_PR () { 430 } |
81
|
|
|
|
|
|
|
sub CODE_GNATS_LOCKED () { 431 } |
82
|
|
|
|
|
|
|
sub CODE_GNATS_NOT_LOCKED () { 432 } |
83
|
|
|
|
|
|
|
sub CODE_PR_NOT_LOCKED () { 433 } |
84
|
|
|
|
|
|
|
sub CODE_READONLY_FIELD () { 434 } |
85
|
|
|
|
|
|
|
sub CODE_INVALID_FTYPE_PROPERTY () { 435 } |
86
|
|
|
|
|
|
|
sub CODE_CMD_ERROR () { 440 } |
87
|
|
|
|
|
|
|
sub CODE_WRITE_PR_FAILED () { 450 } |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
sub CODE_ERROR () { 600 } |
90
|
|
|
|
|
|
|
sub CODE_TIMEOUT () { 610 } |
91
|
|
|
|
|
|
|
sub CODE_NO_GLOBAL_CONFIG () { 620 } |
92
|
|
|
|
|
|
|
sub CODE_INVALID_GLOBAL_CONFIG () { 621 } |
93
|
|
|
|
|
|
|
sub CODE_NO_INDEX () { 630 } |
94
|
|
|
|
|
|
|
sub CODE_FILE_ERROR () { 640 } |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
# bits in fieldinfo(field, flags) has (set=yes not-set=no) whether the |
97
|
|
|
|
|
|
|
# send command should include the field |
98
|
|
|
|
|
|
|
sub SENDINCLUDE () { 1 } |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
# whether change to a field requires reason |
101
|
|
|
|
|
|
|
sub REASONCHANGE () { 2 } |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
# if set, can't be edited |
104
|
|
|
|
|
|
|
sub READONLY () { 4 } |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
# if set, save changes in Audit-Trail |
107
|
|
|
|
|
|
|
sub AUDITINCLUDE () { 8 } |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
# whether the send command _must_ include this field |
110
|
|
|
|
|
|
|
sub SENDREQUIRED () { 16 } |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
# The possible values of a server reply type. $REPLY_CONT means that |
113
|
|
|
|
|
|
|
# there are more reply lines that will follow, $REPLY_END Is the final |
114
|
|
|
|
|
|
|
# line. |
115
|
|
|
|
|
|
|
sub REPLY_CONT () { 1 } |
116
|
|
|
|
|
|
|
sub REPLY_END () { 2 } |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
# This was found as an 'arbitrary' restart value. |
119
|
|
|
|
|
|
|
sub RESTART_CHECK_THRESHOLD () { 5 } |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
# Various PR field names that should probably not be referenced in |
122
|
|
|
|
|
|
|
# here. |
123
|
|
|
|
|
|
|
# |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
# Actually, the majority of uses are probably OK--but we need to map |
126
|
|
|
|
|
|
|
# internal names to external ones. (All of these field names |
127
|
|
|
|
|
|
|
# correspond to internal fields that are likely to be around for a |
128
|
|
|
|
|
|
|
# long time.) |
129
|
|
|
|
|
|
|
# |
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
sub CATEGORY_FIELD () { 'Category' } |
132
|
|
|
|
|
|
|
sub SYNOPSIS_FIELD () { 'Synopsis' } |
133
|
|
|
|
|
|
|
sub SUBMITTER_ID_FIELD () { 'Submitter-Id' } |
134
|
|
|
|
|
|
|
sub ORIGINATOR_FIELD () { 'Originator' } |
135
|
|
|
|
|
|
|
sub AUDIT_TRAIL_FIELD () { 'Audit-Trail' } |
136
|
|
|
|
|
|
|
sub RESPONSIBLE_FIELD () { 'Responsible' } |
137
|
|
|
|
|
|
|
sub LAST_MODIFIED_FIELD () { 'Last-Modified' } |
138
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
sub NUMBER_FIELD () { 'builtinfield:Number' } |
140
|
|
|
|
|
|
|
sub STATE_FIELD () { 'State' } |
141
|
|
|
|
|
|
|
sub UNFORMATTED_FIELD () { 'Unformatted' } |
142
|
|
|
|
|
|
|
sub RELEASE_FIELD () { 'Release' } |
143
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
sub FROM_FIELD () { 'From' } |
145
|
|
|
|
|
|
|
sub REPLYTO_FIELD () { 'Reply-To' } |
146
|
|
|
|
|
|
|
sub TO_FIELD () { 'To' } |
147
|
|
|
|
|
|
|
sub CC_FIELD () { 'Cc' } |
148
|
|
|
|
|
|
|
sub SUBJECT_FIELD () {'Subject'} |
149
|
|
|
|
|
|
|
sub SENDPR_VER_FIELD () {'X-Send-Pr-Version' } |
150
|
|
|
|
|
|
|
sub NOTIFY_FIELD () {'X-GNATS-Notify'} |
151
|
|
|
|
|
|
|
sub MAX_NEW_PRS () { 100 } |
152
|
|
|
|
|
|
|
|
153
|
|
|
|
|
|
|
} |
154
|
|
|
|
|
|
|
|
155
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
|
157
|
|
|
|
|
|
|
=head1 PROTOCOL RESPONSE CODES |
158
|
|
|
|
|
|
|
|
159
|
|
|
|
|
|
|
=head2 CODE_GREETING |
160
|
|
|
|
|
|
|
|
161
|
|
|
|
|
|
|
=cut |
162
|
|
|
|
|
|
|
|
163
|
|
|
|
|
|
|
*CR = \CR(); |
164
|
|
|
|
|
|
|
*LF = \LF(); |
165
|
|
|
|
|
|
|
*CRLF = \CRLF(); |
166
|
|
|
|
|
|
|
*DOT = \DOT(); |
167
|
|
|
|
|
|
|
*CONT = \CONT(); |
168
|
|
|
|
|
|
|
*CODE_GREETING = \CODE_GREETING(); |
169
|
|
|
|
|
|
|
*CODE_CLOSING = \CODE_CLOSING(); |
170
|
|
|
|
|
|
|
*CODE_OK = \CODE_OK(); |
171
|
|
|
|
|
|
|
*CODE_SEND_PR = \CODE_SEND_PR(); |
172
|
|
|
|
|
|
|
*CODE_SEND_TEXT = \CODE_SEND_TEXT(); |
173
|
|
|
|
|
|
|
*CODE_SEND_CHANGE_REASON = \CODE_SEND_CHANGE_REASON(); |
174
|
|
|
|
|
|
|
*CODE_NO_PRS_MATCHED = \CODE_NO_PRS_MATCHED(); |
175
|
|
|
|
|
|
|
*CODE_NO_ADM_ENTRY = \CODE_NO_ADM_ENTRY(); |
176
|
|
|
|
|
|
|
*CODE_PR_READY = \CODE_PR_READY(); |
177
|
|
|
|
|
|
|
*CODE_TEXT_READY = \CODE_TEXT_READY(); |
178
|
|
|
|
|
|
|
*CODE_INFORMATION = \CODE_INFORMATION(); |
179
|
|
|
|
|
|
|
*CODE_INFORMATION_FILLER = \CODE_INFORMATION_FILLER(); |
180
|
|
|
|
|
|
|
*CODE_NONEXISTENT_PR = \CODE_NONEXISTENT_PR(); |
181
|
|
|
|
|
|
|
*CODE_EOF_PR = \CODE_EOF_PR(); |
182
|
|
|
|
|
|
|
*CODE_UNREADABLE_PR = \CODE_UNREADABLE_PR(); |
183
|
|
|
|
|
|
|
*CODE_INVALID_PR_CONTENTS = \CODE_INVALID_PR_CONTENTS(); |
184
|
|
|
|
|
|
|
*CODE_INVALID_FIELD_NAME = \CODE_INVALID_FIELD_NAME(); |
185
|
|
|
|
|
|
|
*CODE_INVALID_ENUM = \CODE_INVALID_ENUM(); |
186
|
|
|
|
|
|
|
*CODE_INVALID_DATE = \CODE_INVALID_DATE(); |
187
|
|
|
|
|
|
|
*CODE_INVALID_FIELD_CONTENTS = \CODE_INVALID_FIELD_CONTENTS(); |
188
|
|
|
|
|
|
|
*CODE_INVALID_SEARCH_TYPE = \CODE_INVALID_SEARCH_TYPE(); |
189
|
|
|
|
|
|
|
*CODE_INVALID_EXPR = \CODE_INVALID_EXPR(); |
190
|
|
|
|
|
|
|
*CODE_INVALID_LIST = \CODE_INVALID_LIST(); |
191
|
|
|
|
|
|
|
*CODE_INVALID_DATABASE = \CODE_INVALID_DATABASE(); |
192
|
|
|
|
|
|
|
*CODE_INVALID_QUERY_FORMAT = \CODE_INVALID_QUERY_FORMAT(); |
193
|
|
|
|
|
|
|
*CODE_NO_KERBEROS = \CODE_NO_KERBEROS(); |
194
|
|
|
|
|
|
|
*CODE_AUTH_TYPE_UNSUP = \CODE_AUTH_TYPE_UNSUP; |
195
|
|
|
|
|
|
|
*CODE_NO_ACCESS = \CODE_NO_ACCESS(); |
196
|
|
|
|
|
|
|
*CODE_LOCKED_PR = \CODE_LOCKED_PR(); |
197
|
|
|
|
|
|
|
*CODE_GNATS_LOCKED = \CODE_GNATS_LOCKED(); |
198
|
|
|
|
|
|
|
*CODE_GNATS_NOT_LOCKED = \CODE_GNATS_NOT_LOCKED(); |
199
|
|
|
|
|
|
|
*CODE_PR_NOT_LOCKED = \CODE_PR_NOT_LOCKED(); |
200
|
|
|
|
|
|
|
*CODE_READONLY_FIELD = \CODE_READONLY_FIELD(); |
201
|
|
|
|
|
|
|
*CODE_INVALID_FTYPE_PROPERTY = \CODE_INVALID_FTYPE_PROPERTY(); |
202
|
|
|
|
|
|
|
*CODE_CMD_ERROR = \CODE_CMD_ERROR(); |
203
|
|
|
|
|
|
|
*CODE_WRITE_PR_FAILED = \CODE_WRITE_PR_FAILED(); |
204
|
|
|
|
|
|
|
*CODE_ERROR = \CODE_ERROR(); |
205
|
|
|
|
|
|
|
*CODE_TIMEOUT = \CODE_TIMEOUT(); |
206
|
|
|
|
|
|
|
*CODE_NO_GLOBAL_CONFIG = \CODE_NO_GLOBAL_CONFIG(); |
207
|
|
|
|
|
|
|
*CODE_INVALID_GLOBAL_CONFIG = \CODE_INVALID_GLOBAL_CONFIG(); |
208
|
|
|
|
|
|
|
*CODE_NO_INDEX = \CODE_NO_INDEX(); |
209
|
|
|
|
|
|
|
*CODE_FILE_ERROR = \CODE_FILE_ERROR(); |
210
|
|
|
|
|
|
|
|
211
|
|
|
|
|
|
|
*SENDINCLUDE = \SENDINCLUDE(); |
212
|
|
|
|
|
|
|
*REASONCHANGE = \REASONCHANGE(); |
213
|
|
|
|
|
|
|
*READONLY = \READONLY(); |
214
|
|
|
|
|
|
|
*AUDITINCLUDE = \AUDITINCLUDE(); |
215
|
|
|
|
|
|
|
*SENDREQUIRED = \SENDREQUIRED(); |
216
|
|
|
|
|
|
|
*REPLY_CONT = \REPLY_CONT(); |
217
|
|
|
|
|
|
|
*REPLY_END = \REPLY_END(); |
218
|
|
|
|
|
|
|
|
219
|
|
|
|
|
|
|
*RESTART_CHECK_THRESHOLD = \RESTART_CHECK_THRESHOLD(); |
220
|
|
|
|
|
|
|
|
221
|
|
|
|
|
|
|
*CATEGORY_FIELD = \CATEGORY_FIELD(); |
222
|
|
|
|
|
|
|
*SYNOPSIS_FIELD = \SYNOPSIS_FIELD(); |
223
|
|
|
|
|
|
|
*SUBMITTER_ID_FIELD = \SUBMITTER_ID_FIELD(); |
224
|
|
|
|
|
|
|
*ORIGINATOR_FIELD = \ORIGINATOR_FIELD(); |
225
|
|
|
|
|
|
|
*AUDIT_TRAIL_FIELD = \AUDIT_TRAIL_FIELD(); |
226
|
|
|
|
|
|
|
*RESPONSIBLE_FIELD = \RESPONSIBLE_FIELD(); |
227
|
|
|
|
|
|
|
*LAST_MODIFIED_FIELD = \LAST_MODIFIED_FIELD(); |
228
|
|
|
|
|
|
|
*NUMBER_FIELD = \NUMBER_FIELD(); |
229
|
|
|
|
|
|
|
*STATE_FIELD = \STATE_FIELD(); |
230
|
|
|
|
|
|
|
*UNFORMATTED_FIELD = \UNFORMATTED_FIELD(); |
231
|
|
|
|
|
|
|
*RELEASE_FIELD = \RELEASE_FIELD(); |
232
|
|
|
|
|
|
|
|
233
|
|
|
|
|
|
|
*FROM_FIELD = \FROM_FIELD(); |
234
|
|
|
|
|
|
|
*REPLYTO_FIELD = \REPLYTO_FIELD(); |
235
|
|
|
|
|
|
|
*TO_FIELD = \TO_FIELD(); |
236
|
|
|
|
|
|
|
*CC_FIELD = \CC_FIELD(); |
237
|
|
|
|
|
|
|
*SUBJECT_FIELD = \SUBJECT_FIELD(); |
238
|
|
|
|
|
|
|
*SENDPR_VER_FIELD = \SENDPR_VER_FIELD(); |
239
|
|
|
|
|
|
|
*NOTIFY_FIELD = \NOTIFY_FIELD(); |
240
|
|
|
|
|
|
|
|
241
|
|
|
|
|
|
|
1; |