line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::Gnats::Command; |
2
|
40
|
|
|
40
|
|
22192
|
use utf8; |
|
40
|
|
|
|
|
92
|
|
|
40
|
|
|
|
|
343
|
|
3
|
40
|
|
|
40
|
|
1833
|
use strictures; |
|
40
|
|
|
|
|
1659
|
|
|
40
|
|
|
|
|
290
|
|
4
|
40
|
|
|
40
|
|
9715
|
use Scalar::Util 'reftype'; |
|
40
|
|
|
|
|
92
|
|
|
40
|
|
|
|
|
2759
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
BEGIN { |
7
|
40
|
|
|
40
|
|
927
|
$Net::Gnats::Command::VERSION = '0.22'; |
8
|
|
|
|
|
|
|
} |
9
|
40
|
|
|
40
|
|
221
|
use vars qw($VERSION); |
|
40
|
|
|
|
|
92
|
|
|
40
|
|
|
|
|
1789
|
|
10
|
|
|
|
|
|
|
|
11
|
40
|
|
|
40
|
|
20856
|
use Net::Gnats::Response; |
|
40
|
|
|
|
|
88
|
|
|
40
|
|
|
|
|
1197
|
|
12
|
40
|
|
|
40
|
|
22030
|
use Net::Gnats::Command::ADMV; |
|
40
|
|
|
|
|
96
|
|
|
40
|
|
|
|
|
1171
|
|
13
|
40
|
|
|
40
|
|
22758
|
use Net::Gnats::Command::APPN; |
|
40
|
|
|
|
|
94
|
|
|
40
|
|
|
|
|
1262
|
|
14
|
40
|
|
|
40
|
|
22071
|
use Net::Gnats::Command::CHDB; |
|
40
|
|
|
|
|
101
|
|
|
40
|
|
|
|
|
1261
|
|
15
|
40
|
|
|
40
|
|
21615
|
use Net::Gnats::Command::CHEK; |
|
40
|
|
|
|
|
109
|
|
|
40
|
|
|
|
|
2300
|
|
16
|
40
|
|
|
40
|
|
22220
|
use Net::Gnats::Command::DBLS; |
|
40
|
|
|
|
|
98
|
|
|
40
|
|
|
|
|
1396
|
|
17
|
40
|
|
|
40
|
|
21316
|
use Net::Gnats::Command::DBDESC; |
|
40
|
|
|
|
|
99
|
|
|
40
|
|
|
|
|
1432
|
|
18
|
40
|
|
|
40
|
|
22043
|
use Net::Gnats::Command::DELETE; |
|
40
|
|
|
|
|
103
|
|
|
40
|
|
|
|
|
1456
|
|
19
|
40
|
|
|
40
|
|
21870
|
use Net::Gnats::Command::EDIT; |
|
40
|
|
|
|
|
98
|
|
|
40
|
|
|
|
|
1513
|
|
20
|
40
|
|
|
40
|
|
21617
|
use Net::Gnats::Command::EDITADDR; |
|
40
|
|
|
|
|
94
|
|
|
40
|
|
|
|
|
1711
|
|
21
|
40
|
|
|
40
|
|
21661
|
use Net::Gnats::Command::EXPR; |
|
40
|
|
|
|
|
102
|
|
|
40
|
|
|
|
|
1614
|
|
22
|
40
|
|
|
40
|
|
21668
|
use Net::Gnats::Command::FDSC; |
|
40
|
|
|
|
|
100
|
|
|
40
|
|
|
|
|
1657
|
|
23
|
40
|
|
|
40
|
|
22027
|
use Net::Gnats::Command::FIELDFLAGS; |
|
40
|
|
|
|
|
120
|
|
|
40
|
|
|
|
|
1997
|
|
24
|
40
|
|
|
40
|
|
22299
|
use Net::Gnats::Command::FTYP; |
|
40
|
|
|
|
|
103
|
|
|
40
|
|
|
|
|
1821
|
|
25
|
40
|
|
|
40
|
|
21952
|
use Net::Gnats::Command::FTYPINFO; |
|
40
|
|
|
|
|
99
|
|
|
40
|
|
|
|
|
1799
|
|
26
|
40
|
|
|
40
|
|
21537
|
use Net::Gnats::Command::FVLD; |
|
40
|
|
|
|
|
102
|
|
|
40
|
|
|
|
|
1902
|
|
27
|
40
|
|
|
40
|
|
22305
|
use Net::Gnats::Command::INPUTDEFAULT; |
|
40
|
|
|
|
|
98
|
|
|
40
|
|
|
|
|
1994
|
|
28
|
40
|
|
|
40
|
|
21915
|
use Net::Gnats::Command::LIST; |
|
40
|
|
|
|
|
104
|
|
|
40
|
|
|
|
|
2120
|
|
29
|
40
|
|
|
40
|
|
22314
|
use Net::Gnats::Command::LKDB; |
|
40
|
|
|
|
|
118
|
|
|
40
|
|
|
|
|
2064
|
|
30
|
40
|
|
|
40
|
|
22068
|
use Net::Gnats::Command::LOCK; |
|
40
|
|
|
|
|
100
|
|
|
40
|
|
|
|
|
2151
|
|
31
|
40
|
|
|
40
|
|
22104
|
use Net::Gnats::Command::QFMT; |
|
40
|
|
|
|
|
98
|
|
|
40
|
|
|
|
|
2091
|
|
32
|
40
|
|
|
40
|
|
22137
|
use Net::Gnats::Command::QUER; |
|
40
|
|
|
|
|
101
|
|
|
40
|
|
|
|
|
2175
|
|
33
|
40
|
|
|
40
|
|
22027
|
use Net::Gnats::Command::REPL; |
|
40
|
|
|
|
|
107
|
|
|
40
|
|
|
|
|
2275
|
|
34
|
40
|
|
|
40
|
|
22313
|
use Net::Gnats::Command::RSET; |
|
40
|
|
|
|
|
98
|
|
|
40
|
|
|
|
|
2373
|
|
35
|
40
|
|
|
40
|
|
22429
|
use Net::Gnats::Command::SUBM; |
|
40
|
|
|
|
|
102
|
|
|
40
|
|
|
|
|
2381
|
|
36
|
40
|
|
|
40
|
|
22410
|
use Net::Gnats::Command::UNDB; |
|
40
|
|
|
|
|
108
|
|
|
40
|
|
|
|
|
2535
|
|
37
|
40
|
|
|
40
|
|
22404
|
use Net::Gnats::Command::UNLK; |
|
40
|
|
|
|
|
100
|
|
|
40
|
|
|
|
|
2584
|
|
38
|
40
|
|
|
40
|
|
22830
|
use Net::Gnats::Command::USER; |
|
40
|
|
|
|
|
101
|
|
|
40
|
|
|
|
|
2577
|
|
39
|
40
|
|
|
40
|
|
23338
|
use Net::Gnats::Command::VFLD; |
|
40
|
|
|
|
|
112
|
|
|
40
|
|
|
|
|
2739
|
|
40
|
40
|
|
|
40
|
|
22371
|
use Net::Gnats::Command::QUIT; |
|
40
|
|
|
|
|
112
|
|
|
40
|
|
|
|
|
77884
|
|
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=head1 NAME |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
Net::Gnats::Command - Command factory and base class. |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=head1 VERSION |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
0.18 |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head1 DESCRIPTION |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
Encapsulates all Gnats Daemon commands and their command processing |
53
|
|
|
|
|
|
|
codes. |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
This module implements the factory pattern for retrieving specific |
56
|
|
|
|
|
|
|
commands. |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=cut |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
our @EXPORT_OK = |
61
|
|
|
|
|
|
|
qw(admv appn chdb chek dbdesc dbls delete_pr edit editaddr expr fdsc |
62
|
|
|
|
|
|
|
fieldflags ftyp ftypinfo fvld inputdefault list lkdb lock_pr qfmt |
63
|
|
|
|
|
|
|
quer quit repl rset subm undb unlk user vfld); |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=head1 CONSTRUCTOR |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=head2 new |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
Instantiates a new L object. |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
$c = Net::Gnats::Command->new; |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
This class is not instantiated directly; it is a superclass for all Gnats |
74
|
|
|
|
|
|
|
command objects. |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=cut |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
sub new { |
79
|
1
|
|
|
1
|
1
|
13
|
my ($class, %options) = @_; |
80
|
|
|
|
|
|
|
|
81
|
1
|
|
|
|
|
4
|
my $self = bless {}, $class; |
82
|
1
|
|
|
|
|
7
|
return $self; |
83
|
|
|
|
|
|
|
} |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=head1 ACCESSORS |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
=head2 field |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
Sets and retrieves a L to the command. |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=cut |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
sub field { |
94
|
17
|
|
|
17
|
1
|
37
|
my ( $self, $value ) = @_; |
95
|
17
|
100
|
|
|
|
99
|
return $self->{field} if not defined $value; |
96
|
4
|
100
|
|
|
|
21
|
return $self->{field} if not defined reftype($value); |
97
|
3
|
100
|
|
|
|
15
|
return $self->{field} if not reftype($value) eq 'HASH'; |
98
|
2
|
100
|
|
|
|
26
|
return $self->{field} if not $value->isa('Net::Gnats::FieldInstance'); |
99
|
|
|
|
|
|
|
|
100
|
1
|
|
|
|
|
4
|
$self->{field} = $value; |
101
|
1
|
|
|
|
|
5
|
return $self->{field}; |
102
|
|
|
|
|
|
|
} |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
=head2 field_change_reason |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
Sets and retrieves a L for Change Reasons to the |
107
|
|
|
|
|
|
|
command. |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
This may be removed in the future given a FieldInstance now manages its own |
110
|
|
|
|
|
|
|
Change Reason. |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
=cut |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
sub field_change_reason { |
115
|
9
|
|
|
9
|
1
|
24
|
my ( $self, $value ) = @_; |
116
|
9
|
100
|
|
|
|
40
|
return $self->{field_change_reason} if not defined $value; |
117
|
4
|
100
|
|
|
|
21
|
return $self->{field_change_reason} if not defined reftype($value); |
118
|
3
|
100
|
|
|
|
13
|
return $self->{field_change_reason} if not reftype($value) eq 'HASH'; |
119
|
|
|
|
|
|
|
return $self->{field_change_reason} |
120
|
2
|
100
|
|
|
|
14
|
if not $value->isa('Net::Gnats::FieldInstance'); |
121
|
|
|
|
|
|
|
|
122
|
1
|
|
|
|
|
4
|
$self->{field_change_reason} = $value; |
123
|
1
|
|
|
|
|
4
|
return $self->{field_change_reason}; |
124
|
|
|
|
|
|
|
} |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
=head2 pr |
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
For commands that must send a serialized PR, or serialized field, after issuing a command. |
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
=cut |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
sub pr { |
133
|
11
|
|
|
11
|
1
|
25
|
my ( $self, $value ) = @_; |
134
|
11
|
100
|
|
|
|
58
|
return $self->{pr} if not defined $value; |
135
|
4
|
100
|
|
|
|
20
|
return $self->{pr} if not defined reftype($value); |
136
|
3
|
100
|
|
|
|
14
|
return $self->{pr} if not reftype($value) eq 'HASH'; |
137
|
2
|
100
|
|
|
|
20
|
return $self->{pr} if not $value->isa('Net::Gnats::PR'); |
138
|
|
|
|
|
|
|
|
139
|
1
|
|
|
|
|
4
|
$self->{pr} = $value; |
140
|
1
|
|
|
|
|
5
|
return $self->{pr}; |
141
|
|
|
|
|
|
|
} |
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
=head2 error_codes |
144
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
Retrieves the valid error codes for the command. Not used yet. |
146
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
my $codes = $c->error_codes; |
148
|
|
|
|
|
|
|
|
149
|
|
|
|
|
|
|
=cut |
150
|
|
|
|
|
|
|
|
151
|
1
|
|
|
1
|
1
|
5
|
sub error_codes { shift->{error_codes} } |
152
|
|
|
|
|
|
|
|
153
|
|
|
|
|
|
|
|
154
|
|
|
|
|
|
|
=head2 success_codes |
155
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
Retrieves the valid success codes for the command. Not used yet. |
157
|
|
|
|
|
|
|
|
158
|
|
|
|
|
|
|
my $codes = $c->success_codes; |
159
|
|
|
|
|
|
|
|
160
|
|
|
|
|
|
|
=cut |
161
|
|
|
|
|
|
|
|
162
|
1
|
|
|
1
|
1
|
5
|
sub success_codes { shift->{success_codes} } |
163
|
|
|
|
|
|
|
|
164
|
|
|
|
|
|
|
=head2 response |
165
|
|
|
|
|
|
|
|
166
|
|
|
|
|
|
|
Manages the response outcome from the server encapsulated in a |
167
|
|
|
|
|
|
|
L object. |
168
|
|
|
|
|
|
|
|
169
|
|
|
|
|
|
|
When the command has not been issued yet, the value will be undef. |
170
|
|
|
|
|
|
|
|
171
|
|
|
|
|
|
|
$response = $c->response; |
172
|
|
|
|
|
|
|
$code = $c->response->code; |
173
|
|
|
|
|
|
|
|
174
|
|
|
|
|
|
|
=cut |
175
|
|
|
|
|
|
|
|
176
|
|
|
|
|
|
|
sub response { |
177
|
6670
|
|
|
6670
|
1
|
9239
|
my ($self, $value) = @_; |
178
|
6670
|
100
|
|
|
|
13595
|
$self->{response} = $value if defined $value; |
179
|
6670
|
|
|
|
|
21326
|
return $self->{response}; |
180
|
|
|
|
|
|
|
} |
181
|
|
|
|
|
|
|
|
182
|
|
|
|
|
|
|
=head2 requests_multi |
183
|
|
|
|
|
|
|
|
184
|
|
|
|
|
|
|
A flag for knowing if multiple responses are expected. Normally used and |
185
|
|
|
|
|
|
|
managed internally. May become a private method later. |
186
|
|
|
|
|
|
|
|
187
|
|
|
|
|
|
|
=cut |
188
|
|
|
|
|
|
|
|
189
|
|
|
|
|
|
|
sub requests_multi { |
190
|
1
|
|
|
1
|
1
|
3
|
my $self = shift; |
191
|
1
|
|
|
|
|
5
|
return $self->{requests_multi}; |
192
|
|
|
|
|
|
|
} |
193
|
|
|
|
|
|
|
|
194
|
|
|
|
|
|
|
|
195
|
|
|
|
|
|
|
=head1 METHODS |
196
|
|
|
|
|
|
|
|
197
|
|
|
|
|
|
|
=head2 as_string |
198
|
|
|
|
|
|
|
|
199
|
|
|
|
|
|
|
Returns the currently configured command as a string. |
200
|
|
|
|
|
|
|
|
201
|
|
|
|
|
|
|
=cut |
202
|
|
|
|
|
|
|
|
203
|
|
|
|
|
|
|
sub as_string { |
204
|
10
|
|
|
10
|
1
|
37
|
my ( $self ) = @_; |
205
|
|
|
|
|
|
|
} |
206
|
|
|
|
|
|
|
|
207
|
|
|
|
|
|
|
=head2 from |
208
|
|
|
|
|
|
|
|
209
|
|
|
|
|
|
|
This method is used for commands where 1..n fields can be defined for a given |
210
|
|
|
|
|
|
|
command, and the issuer needs to match up field names to values. |
211
|
|
|
|
|
|
|
|
212
|
|
|
|
|
|
|
$c = Net::Gnats::Command->fdsc( [ 'FieldA', 'FieldB' ]; |
213
|
|
|
|
|
|
|
Net::Gnats->current_session->issue( $c ); |
214
|
|
|
|
|
|
|
$value = $c->from( 'FieldA' ) unless not $c->is_ok; |
215
|
|
|
|
|
|
|
|
216
|
|
|
|
|
|
|
=cut |
217
|
|
|
|
|
|
|
|
218
|
|
|
|
|
|
|
sub from { |
219
|
3648
|
|
|
3648
|
1
|
5134
|
my ( $self, $value ) = @_; |
220
|
|
|
|
|
|
|
# identify idx of value |
221
|
3648
|
|
|
|
|
4233
|
my @fields = @{ $self->{fields} }; |
|
3648
|
|
|
|
|
16983
|
|
222
|
3648
|
|
|
|
|
7687
|
my ( $index )= grep { $fields[$_] =~ /$value/ } 0..$#fields; |
|
87552
|
|
|
|
|
183143
|
|
223
|
3648
|
|
|
|
|
6351
|
return @{ $self->response->as_list }[$index]; |
|
3648
|
|
|
|
|
7295
|
|
224
|
|
|
|
|
|
|
} |
225
|
|
|
|
|
|
|
|
226
|
|
|
|
|
|
|
=head1 EXPORTED METHODS |
227
|
|
|
|
|
|
|
|
228
|
|
|
|
|
|
|
The following exported methods are helpers for executing all Gnats |
229
|
|
|
|
|
|
|
protocol commands. |
230
|
|
|
|
|
|
|
|
231
|
|
|
|
|
|
|
=head2 admv |
232
|
|
|
|
|
|
|
|
233
|
|
|
|
|
|
|
my $c = Net::Gnats::Command->admv; |
234
|
|
|
|
|
|
|
|
235
|
|
|
|
|
|
|
=cut |
236
|
|
|
|
|
|
|
|
237
|
1
|
|
|
1
|
1
|
1
|
sub admv { shift; return Net::Gnats::Command::ADMV->new( @_ ); } |
|
1
|
|
|
|
|
5
|
|
238
|
|
|
|
|
|
|
|
239
|
|
|
|
|
|
|
=head2 appn |
240
|
|
|
|
|
|
|
|
241
|
|
|
|
|
|
|
Manages the command for appending field content to an existing PR field. The |
242
|
|
|
|
|
|
|
field key is a L object. |
243
|
|
|
|
|
|
|
|
244
|
|
|
|
|
|
|
$c = Net::Gnats::Command->appn( pr_number => 5, field => $field ); |
245
|
|
|
|
|
|
|
|
246
|
|
|
|
|
|
|
See L for details. |
247
|
|
|
|
|
|
|
|
248
|
|
|
|
|
|
|
=cut |
249
|
|
|
|
|
|
|
|
250
|
4
|
|
|
4
|
1
|
17
|
sub appn { shift; return Net::Gnats::Command::APPN->new( @_ ); } |
|
4
|
|
|
|
|
20
|
|
251
|
|
|
|
|
|
|
|
252
|
|
|
|
|
|
|
=head2 chdb |
253
|
|
|
|
|
|
|
|
254
|
|
|
|
|
|
|
Manages the command for changing databases within the same |
255
|
|
|
|
|
|
|
L instance. |
256
|
|
|
|
|
|
|
|
257
|
|
|
|
|
|
|
$c = Net::Gnats::Command->chdb( database => 'external' ); |
258
|
|
|
|
|
|
|
|
259
|
|
|
|
|
|
|
See L for details. |
260
|
|
|
|
|
|
|
|
261
|
|
|
|
|
|
|
=cut |
262
|
|
|
|
|
|
|
|
263
|
2
|
|
|
2
|
1
|
6
|
sub chdb { shift; return Net::Gnats::Command::CHDB->new( @_ ); } |
|
2
|
|
|
|
|
16
|
|
264
|
|
|
|
|
|
|
|
265
|
|
|
|
|
|
|
=head2 chek |
266
|
|
|
|
|
|
|
|
267
|
|
|
|
|
|
|
Manages the command for checking the validity of a PR before sending. |
268
|
|
|
|
|
|
|
|
269
|
|
|
|
|
|
|
# New problem reports: |
270
|
|
|
|
|
|
|
$c = Net::Gnats::Command->chek( type => 'initial', pr => $pr ); |
271
|
|
|
|
|
|
|
|
272
|
|
|
|
|
|
|
# Existing problem reports: |
273
|
|
|
|
|
|
|
$c = Net::Gnats::Command->chek( pr => $pr ); |
274
|
|
|
|
|
|
|
|
275
|
|
|
|
|
|
|
See L for details. |
276
|
|
|
|
|
|
|
|
277
|
|
|
|
|
|
|
=cut |
278
|
|
|
|
|
|
|
|
279
|
1
|
|
|
1
|
1
|
2
|
sub chek { shift; return Net::Gnats::Command::CHEK->new( @_ ); } |
|
1
|
|
|
|
|
5
|
|
280
|
|
|
|
|
|
|
|
281
|
|
|
|
|
|
|
=head2 dbls |
282
|
|
|
|
|
|
|
|
283
|
|
|
|
|
|
|
Manages the command to list server databases. This command is the only command |
284
|
|
|
|
|
|
|
that typically does not require credentials. |
285
|
|
|
|
|
|
|
|
286
|
|
|
|
|
|
|
$c = Net::Gnats::Command->dbls; |
287
|
|
|
|
|
|
|
|
288
|
|
|
|
|
|
|
See L for details. |
289
|
|
|
|
|
|
|
|
290
|
|
|
|
|
|
|
=cut |
291
|
|
|
|
|
|
|
|
292
|
7
|
|
|
7
|
1
|
23
|
sub dbls { shift; return Net::Gnats::Command::DBLS->new( @_ ); } |
|
7
|
|
|
|
|
39
|
|
293
|
|
|
|
|
|
|
|
294
|
|
|
|
|
|
|
=head2 dbdesc |
295
|
|
|
|
|
|
|
|
296
|
|
|
|
|
|
|
Manages the command for returning the description of the databases existing on |
297
|
|
|
|
|
|
|
the server. |
298
|
|
|
|
|
|
|
|
299
|
|
|
|
|
|
|
$c = Net::Gnats::Command->dbdesc; |
300
|
|
|
|
|
|
|
|
301
|
|
|
|
|
|
|
See L for details. |
302
|
|
|
|
|
|
|
|
303
|
|
|
|
|
|
|
=cut |
304
|
|
|
|
|
|
|
|
305
|
3
|
|
|
3
|
1
|
15
|
sub dbdesc { shift; return Net::Gnats::Command::DBDESC->new( @_ ); } |
|
3
|
|
|
|
|
15
|
|
306
|
|
|
|
|
|
|
|
307
|
|
|
|
|
|
|
=head2 delete_pr |
308
|
|
|
|
|
|
|
|
309
|
|
|
|
|
|
|
Manages the command for deleting a PR from the database. Only those with |
310
|
|
|
|
|
|
|
'admin' credentials can successfully issue this command. |
311
|
|
|
|
|
|
|
|
312
|
|
|
|
|
|
|
$c = Net::Gnats::Command->delete_pr( pr => $pr ); |
313
|
|
|
|
|
|
|
|
314
|
|
|
|
|
|
|
See L for details. |
315
|
|
|
|
|
|
|
|
316
|
|
|
|
|
|
|
=cut |
317
|
|
|
|
|
|
|
|
318
|
1
|
|
|
1
|
1
|
2
|
sub delete_pr { shift; return Net::Gnats::Command::DELETE->new( @_ ); } |
|
1
|
|
|
|
|
9
|
|
319
|
|
|
|
|
|
|
|
320
|
|
|
|
|
|
|
=head2 edit |
321
|
|
|
|
|
|
|
|
322
|
|
|
|
|
|
|
Manages the command for submitting an update to an existing PR to the database. |
323
|
|
|
|
|
|
|
|
324
|
|
|
|
|
|
|
$c = Net::Gnats::Command->edit( pr => $pr ); |
325
|
|
|
|
|
|
|
|
326
|
|
|
|
|
|
|
See L for details. |
327
|
|
|
|
|
|
|
|
328
|
|
|
|
|
|
|
=cut |
329
|
|
|
|
|
|
|
|
330
|
5
|
|
|
5
|
1
|
20
|
sub edit { shift; return Net::Gnats::Command::EDIT->new( @_ ); } |
|
5
|
|
|
|
|
29
|
|
331
|
|
|
|
|
|
|
|
332
|
|
|
|
|
|
|
=head2 editaddr |
333
|
|
|
|
|
|
|
|
334
|
|
|
|
|
|
|
Manages the command for setting the active email address for the session. This |
335
|
|
|
|
|
|
|
is most relevant when submitting or editing PRs. |
336
|
|
|
|
|
|
|
|
337
|
|
|
|
|
|
|
$address = 'joe@somewhere.com'; |
338
|
|
|
|
|
|
|
$c = Net::Gnats::Command->editaddr( address => $address ); |
339
|
|
|
|
|
|
|
|
340
|
|
|
|
|
|
|
See L for details. |
341
|
|
|
|
|
|
|
|
342
|
|
|
|
|
|
|
=cut |
343
|
|
|
|
|
|
|
|
344
|
4
|
|
|
4
|
1
|
14
|
sub editaddr { shift; return Net::Gnats::Command::EDITADDR->new( @_ ); } |
|
4
|
|
|
|
|
34
|
|
345
|
|
|
|
|
|
|
|
346
|
|
|
|
|
|
|
=head2 expr |
347
|
|
|
|
|
|
|
|
348
|
|
|
|
|
|
|
Manages the command for setting the query expression for a PR. Query |
349
|
|
|
|
|
|
|
expressions AND together. |
350
|
|
|
|
|
|
|
|
351
|
|
|
|
|
|
|
This method may change in the future. |
352
|
|
|
|
|
|
|
|
353
|
|
|
|
|
|
|
$c = Net::Gnats::Command->expr( expressions => ['foo="bar"', 'bar="baz"'] ); |
354
|
|
|
|
|
|
|
|
355
|
|
|
|
|
|
|
See L for details. |
356
|
|
|
|
|
|
|
|
357
|
|
|
|
|
|
|
=cut |
358
|
|
|
|
|
|
|
|
359
|
7
|
|
|
7
|
1
|
24
|
sub expr { shift; return Net::Gnats::Command::EXPR->new( @_ ); } |
|
7
|
|
|
|
|
48
|
|
360
|
|
|
|
|
|
|
|
361
|
|
|
|
|
|
|
=head2 fdsc |
362
|
|
|
|
|
|
|
|
363
|
|
|
|
|
|
|
Manages the command for retrieving the description for one or more fields. |
364
|
|
|
|
|
|
|
|
365
|
|
|
|
|
|
|
$c = Net::Gnats::Command->fdsc( fields => 'MyField' ); |
366
|
|
|
|
|
|
|
$c = Net::Gnats::Command->fdsc( fields => [ 'Field1', 'Field2' ] ); |
367
|
|
|
|
|
|
|
|
368
|
|
|
|
|
|
|
See L for details. |
369
|
|
|
|
|
|
|
|
370
|
|
|
|
|
|
|
=cut |
371
|
|
|
|
|
|
|
|
372
|
41
|
|
|
41
|
1
|
88
|
sub fdsc { shift; return Net::Gnats::Command::FDSC->new( @_ ); } |
|
41
|
|
|
|
|
377
|
|
373
|
|
|
|
|
|
|
|
374
|
|
|
|
|
|
|
=head2 fieldflags |
375
|
|
|
|
|
|
|
|
376
|
|
|
|
|
|
|
Manages the command for retrieving field flags for one or more fields. |
377
|
|
|
|
|
|
|
|
378
|
|
|
|
|
|
|
$c = Net::Gnats::Command->fieldflags( fields => 'MyField' ); |
379
|
|
|
|
|
|
|
$c = Net::Gnats::Command->fieldflags( fields => [ 'Field1', 'Field2' ] ); |
380
|
|
|
|
|
|
|
|
381
|
|
|
|
|
|
|
See L for details. |
382
|
|
|
|
|
|
|
|
383
|
|
|
|
|
|
|
=cut |
384
|
|
|
|
|
|
|
|
385
|
41
|
|
|
41
|
1
|
81
|
sub fieldflags { shift; return Net::Gnats::Command::FIELDFLAGS->new( @_ ); } |
|
41
|
|
|
|
|
350
|
|
386
|
|
|
|
|
|
|
|
387
|
|
|
|
|
|
|
=head2 ftyp |
388
|
|
|
|
|
|
|
|
389
|
|
|
|
|
|
|
Manages the command for retrieving the data type for one or more fields. |
390
|
|
|
|
|
|
|
|
391
|
|
|
|
|
|
|
$c = Net::Gnats::Command->ftyp( fields => 'MyField' ); |
392
|
|
|
|
|
|
|
$c = Net::Gnats::Command->ftyp( fields => [ 'Field1', 'Field2' ] ); |
393
|
|
|
|
|
|
|
|
394
|
|
|
|
|
|
|
See L for details. |
395
|
|
|
|
|
|
|
|
396
|
|
|
|
|
|
|
=cut |
397
|
|
|
|
|
|
|
|
398
|
46
|
|
|
46
|
1
|
116
|
sub ftyp { shift; return Net::Gnats::Command::FTYP->new( @_ ); } |
|
46
|
|
|
|
|
427
|
|
399
|
|
|
|
|
|
|
|
400
|
|
|
|
|
|
|
=head2 ftypinfo |
401
|
|
|
|
|
|
|
|
402
|
|
|
|
|
|
|
Manages the command for retrieving the type information for a field. Relevant |
403
|
|
|
|
|
|
|
to MultiEnum fields only. |
404
|
|
|
|
|
|
|
|
405
|
|
|
|
|
|
|
$c = Net::Gnats::Command->ftypinfo( field => 'MyField' ); |
406
|
|
|
|
|
|
|
$c = Net::Gnats::Command->ftypinfo( field => 'MyField', |
407
|
|
|
|
|
|
|
property => 'separators ); |
408
|
|
|
|
|
|
|
|
409
|
|
|
|
|
|
|
See L for details. |
410
|
|
|
|
|
|
|
|
411
|
|
|
|
|
|
|
=cut |
412
|
|
|
|
|
|
|
|
413
|
3
|
|
|
3
|
1
|
12
|
sub ftypinfo { shift; return Net::Gnats::Command::FTYPINFO->new( @_ ); } |
|
3
|
|
|
|
|
15
|
|
414
|
|
|
|
|
|
|
|
415
|
|
|
|
|
|
|
=head2 fvld |
416
|
|
|
|
|
|
|
|
417
|
|
|
|
|
|
|
Manages the command for retrieving the set field validators defined in the |
418
|
|
|
|
|
|
|
Gnats schema. |
419
|
|
|
|
|
|
|
|
420
|
|
|
|
|
|
|
$c = Net::Gnats::Command->fvld( field => 'MyField' ); |
421
|
|
|
|
|
|
|
|
422
|
|
|
|
|
|
|
See L for details. |
423
|
|
|
|
|
|
|
|
424
|
|
|
|
|
|
|
=cut |
425
|
|
|
|
|
|
|
|
426
|
3
|
|
|
3
|
1
|
9
|
sub fvld { shift; return Net::Gnats::Command::FVLD->new( @_ ); } |
|
3
|
|
|
|
|
16
|
|
427
|
|
|
|
|
|
|
|
428
|
|
|
|
|
|
|
=head2 inputdefault |
429
|
|
|
|
|
|
|
|
430
|
|
|
|
|
|
|
Manages the command for retrieving field default values. |
431
|
|
|
|
|
|
|
|
432
|
|
|
|
|
|
|
$c = Net::Gnats::Command->inputdefault( fields => 'MyField' ); |
433
|
|
|
|
|
|
|
$c = Net::Gnats::Command->inputdefault( fields => [ 'Field1', 'Field2' ] ); |
434
|
|
|
|
|
|
|
|
435
|
|
|
|
|
|
|
See L for details. |
436
|
|
|
|
|
|
|
|
437
|
|
|
|
|
|
|
=cut |
438
|
|
|
|
|
|
|
|
439
|
41
|
|
|
41
|
1
|
94
|
sub inputdefault { shift; return Net::Gnats::Command::INPUTDEFAULT->new( @_ ); } |
|
41
|
|
|
|
|
368
|
|
440
|
|
|
|
|
|
|
|
441
|
|
|
|
|
|
|
=head2 list |
442
|
|
|
|
|
|
|
|
443
|
|
|
|
|
|
|
Manages the command for different lists that can be retrieved from Gnats. |
444
|
|
|
|
|
|
|
|
445
|
|
|
|
|
|
|
$c = Net::Gnats::Command->list( subcommand => 'Categories' ); |
446
|
|
|
|
|
|
|
$c = Net::Gnats::Command->list( subcommand => 'Submitters' ); |
447
|
|
|
|
|
|
|
$c = Net::Gnats::Command->list( subcommand => 'Responsible' ); |
448
|
|
|
|
|
|
|
$c = Net::Gnats::Command->list( subcommand => 'States' ); |
449
|
|
|
|
|
|
|
$c = Net::Gnats::Command->list( subcommand => 'FieldNames' ); |
450
|
|
|
|
|
|
|
$c = Net::Gnats::Command->list( subcommand => 'InitialInputFields' ); |
451
|
|
|
|
|
|
|
$c = Net::Gnats::Command->list( subcommand => 'InitialRequiredFields' ); |
452
|
|
|
|
|
|
|
$c = Net::Gnats::Command->list( subcommand => 'Databases' ); |
453
|
|
|
|
|
|
|
|
454
|
|
|
|
|
|
|
See L for details. |
455
|
|
|
|
|
|
|
|
456
|
|
|
|
|
|
|
=cut |
457
|
|
|
|
|
|
|
|
458
|
133
|
|
|
133
|
1
|
207
|
sub list { shift; return Net::Gnats::Command::LIST->new( @_ ); } |
|
133
|
|
|
|
|
658
|
|
459
|
|
|
|
|
|
|
|
460
|
|
|
|
|
|
|
=head2 lkdb |
461
|
|
|
|
|
|
|
|
462
|
|
|
|
|
|
|
Manages the command for locking the gnats main database. |
463
|
|
|
|
|
|
|
|
464
|
|
|
|
|
|
|
$c = Net::Gnats::Command->lkdb; |
465
|
|
|
|
|
|
|
|
466
|
|
|
|
|
|
|
See L for details. |
467
|
|
|
|
|
|
|
|
468
|
|
|
|
|
|
|
=cut |
469
|
|
|
|
|
|
|
|
470
|
4
|
|
|
4
|
1
|
12
|
sub lkdb { shift; return Net::Gnats::Command::LKDB->new( @_ ); } |
|
4
|
|
|
|
|
18
|
|
471
|
|
|
|
|
|
|
|
472
|
|
|
|
|
|
|
=head2 lock_pr |
473
|
|
|
|
|
|
|
|
474
|
|
|
|
|
|
|
Manages the command for locking a specific PR. Usually this occurs prior to |
475
|
|
|
|
|
|
|
updating a PR through the edit command. |
476
|
|
|
|
|
|
|
|
477
|
|
|
|
|
|
|
$c = Net::Gnats::Command->lock_pr( pr => $pr, user => $user ); |
478
|
|
|
|
|
|
|
$c = Net::Gnats::Command->lock_pr( pr => $pr, user => $user, pid => $pid ); |
479
|
|
|
|
|
|
|
|
480
|
|
|
|
|
|
|
See L for details. |
481
|
|
|
|
|
|
|
|
482
|
|
|
|
|
|
|
=cut |
483
|
|
|
|
|
|
|
|
484
|
9
|
|
|
9
|
1
|
28
|
sub lock_pr { shift; return Net::Gnats::Command::LOCK->new( @_ ); } |
|
9
|
|
|
|
|
44
|
|
485
|
|
|
|
|
|
|
|
486
|
|
|
|
|
|
|
=head2 qfmt |
487
|
|
|
|
|
|
|
|
488
|
|
|
|
|
|
|
Manages the command for setting the PR output format. Net::Gnats parses 'full' |
489
|
|
|
|
|
|
|
format only. If you choose another format, you can retrieve the response via |
490
|
|
|
|
|
|
|
$c->response->as_string. |
491
|
|
|
|
|
|
|
|
492
|
|
|
|
|
|
|
$c = Net::Gnats::Command->qfmt( format => 'full' ); |
493
|
|
|
|
|
|
|
|
494
|
|
|
|
|
|
|
See L for details. |
495
|
|
|
|
|
|
|
|
496
|
|
|
|
|
|
|
=cut |
497
|
|
|
|
|
|
|
|
498
|
15
|
|
|
15
|
1
|
31
|
sub qfmt { shift; return Net::Gnats::Command::QFMT->new( @_ ); } |
|
15
|
|
|
|
|
83
|
|
499
|
|
|
|
|
|
|
|
500
|
|
|
|
|
|
|
=head2 quer |
501
|
|
|
|
|
|
|
|
502
|
|
|
|
|
|
|
Manages the command for querying Gnats. It assumes the expressions have |
503
|
|
|
|
|
|
|
already been set. If specific numbers are set, the command will query only |
504
|
|
|
|
|
|
|
those PR numbers. |
505
|
|
|
|
|
|
|
|
506
|
|
|
|
|
|
|
$c = Net::Gnats::Command->quer; |
507
|
|
|
|
|
|
|
$c = Net::Gnats::Command->quer( pr_numbers => ['10'] ); |
508
|
|
|
|
|
|
|
$c = Net::Gnats::Command->quer( pr_numbers => ['10', '12'] ); |
509
|
|
|
|
|
|
|
|
510
|
|
|
|
|
|
|
See L for details. |
511
|
|
|
|
|
|
|
|
512
|
|
|
|
|
|
|
=cut |
513
|
|
|
|
|
|
|
|
514
|
15
|
|
|
15
|
1
|
27
|
sub quer { shift; return Net::Gnats::Command::QUER->new( @_ ); } |
|
15
|
|
|
|
|
72
|
|
515
|
|
|
|
|
|
|
|
516
|
|
|
|
|
|
|
=head2 quit |
517
|
|
|
|
|
|
|
|
518
|
|
|
|
|
|
|
Manages the command for disconnecting the current Gnats session. |
519
|
|
|
|
|
|
|
|
520
|
|
|
|
|
|
|
$c = Net::Gnats::Command->quit; |
521
|
|
|
|
|
|
|
|
522
|
|
|
|
|
|
|
See L for details. |
523
|
|
|
|
|
|
|
|
524
|
|
|
|
|
|
|
=cut |
525
|
|
|
|
|
|
|
|
526
|
5
|
|
|
5
|
1
|
10
|
sub quit { shift; return Net::Gnats::Command::QUIT->new( @_ ); } |
|
5
|
|
|
|
|
39
|
|
527
|
|
|
|
|
|
|
|
528
|
|
|
|
|
|
|
=head2 repl |
529
|
|
|
|
|
|
|
|
530
|
|
|
|
|
|
|
Manages the command for replacing field contents. |
531
|
|
|
|
|
|
|
|
532
|
|
|
|
|
|
|
$c = Net::Gnats::Command->appn( pr_number => 5, field => $field ); |
533
|
|
|
|
|
|
|
|
534
|
|
|
|
|
|
|
See L for details. |
535
|
|
|
|
|
|
|
|
536
|
|
|
|
|
|
|
=cut |
537
|
|
|
|
|
|
|
|
538
|
9
|
|
|
9
|
1
|
25
|
sub repl { shift; return Net::Gnats::Command::REPL->new( @_ ); } |
|
9
|
|
|
|
|
52
|
|
539
|
|
|
|
|
|
|
|
540
|
|
|
|
|
|
|
=head2 rset |
541
|
|
|
|
|
|
|
|
542
|
|
|
|
|
|
|
Manages the command for resetting the index and any query expressions on the |
543
|
|
|
|
|
|
|
server. |
544
|
|
|
|
|
|
|
|
545
|
|
|
|
|
|
|
$c = Net::Gnats::Command->rset; |
546
|
|
|
|
|
|
|
|
547
|
|
|
|
|
|
|
See L for details. |
548
|
|
|
|
|
|
|
|
549
|
|
|
|
|
|
|
=cut |
550
|
|
|
|
|
|
|
|
551
|
13
|
|
|
13
|
1
|
28
|
sub rset { shift; return Net::Gnats::Command::RSET->new( @_ ); } |
|
13
|
|
|
|
|
84
|
|
552
|
|
|
|
|
|
|
|
553
|
|
|
|
|
|
|
=head2 subm |
554
|
|
|
|
|
|
|
|
555
|
|
|
|
|
|
|
Manages the command for submitting a new PR to Gnats. If the named PR already |
556
|
|
|
|
|
|
|
has a 'Number', a new PR with the same field contents will be created. |
557
|
|
|
|
|
|
|
|
558
|
|
|
|
|
|
|
$c = Net::Gnats::Command->subm( pr => $pr ); |
559
|
|
|
|
|
|
|
|
560
|
|
|
|
|
|
|
See L for details. |
561
|
|
|
|
|
|
|
|
562
|
|
|
|
|
|
|
=cut |
563
|
|
|
|
|
|
|
|
564
|
7
|
|
|
7
|
1
|
22
|
sub subm { shift; return Net::Gnats::Command::SUBM->new( @_ ); } |
|
7
|
|
|
|
|
38
|
|
565
|
|
|
|
|
|
|
|
566
|
|
|
|
|
|
|
=head2 undb |
567
|
|
|
|
|
|
|
|
568
|
|
|
|
|
|
|
Manages the command for unlocking the Gnats main database. |
569
|
|
|
|
|
|
|
|
570
|
|
|
|
|
|
|
$c = Net::Gnats::Command->undb; |
571
|
|
|
|
|
|
|
|
572
|
|
|
|
|
|
|
See L for details. |
573
|
|
|
|
|
|
|
|
574
|
|
|
|
|
|
|
=cut |
575
|
|
|
|
|
|
|
|
576
|
1
|
|
|
1
|
1
|
7
|
sub undb { shift; return Net::Gnats::Command::UNDB->new( @_ ); } |
|
1
|
|
|
|
|
11
|
|
577
|
|
|
|
|
|
|
|
578
|
|
|
|
|
|
|
=head2 unlk |
579
|
|
|
|
|
|
|
|
580
|
|
|
|
|
|
|
Manages the command for unlocking a specific PR. |
581
|
|
|
|
|
|
|
|
582
|
|
|
|
|
|
|
$c = Net::Gnats::Command->unlk( pr_number => $pr->get_field('Number')->value ); |
583
|
|
|
|
|
|
|
|
584
|
|
|
|
|
|
|
See L for details. |
585
|
|
|
|
|
|
|
|
586
|
|
|
|
|
|
|
=cut |
587
|
|
|
|
|
|
|
|
588
|
4
|
|
|
4
|
1
|
14
|
sub unlk { shift; return Net::Gnats::Command::UNLK->new( @_ ); } |
|
4
|
|
|
|
|
31
|
|
589
|
|
|
|
|
|
|
|
590
|
|
|
|
|
|
|
=head2 user |
591
|
|
|
|
|
|
|
|
592
|
|
|
|
|
|
|
Manages the command for setting the security context for the session. |
593
|
|
|
|
|
|
|
|
594
|
|
|
|
|
|
|
$c = Net::Gnats::Command->user( username => $username, password => $password ); |
595
|
|
|
|
|
|
|
|
596
|
|
|
|
|
|
|
See L for details. |
597
|
|
|
|
|
|
|
|
598
|
|
|
|
|
|
|
=cut |
599
|
|
|
|
|
|
|
|
600
|
85
|
|
|
85
|
1
|
162
|
sub user { shift; return Net::Gnats::Command::USER->new( @_ ); } |
|
85
|
|
|
|
|
543
|
|
601
|
|
|
|
|
|
|
|
602
|
|
|
|
|
|
|
=head2 vfld |
603
|
|
|
|
|
|
|
|
604
|
|
|
|
|
|
|
Manages the command for validating a specific field. The field is a |
605
|
|
|
|
|
|
|
L object. |
606
|
|
|
|
|
|
|
|
607
|
|
|
|
|
|
|
$c = Net::Gnats::Command->vfld( field => $field ); |
608
|
|
|
|
|
|
|
$c = Net::Gnats::Command->vfld( field => $pr->get_field('Synopsis'); |
609
|
|
|
|
|
|
|
|
610
|
|
|
|
|
|
|
See L for details. |
611
|
|
|
|
|
|
|
|
612
|
|
|
|
|
|
|
=cut |
613
|
|
|
|
|
|
|
|
614
|
2
|
|
|
2
|
1
|
9
|
sub vfld { shift; return Net::Gnats::Command::VFLD->new( @_ ); } |
|
2
|
|
|
|
|
11
|
|
615
|
|
|
|
|
|
|
|
616
|
|
|
|
|
|
|
|
617
|
|
|
|
|
|
|
1; |