line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::Gnats::Command; |
2
|
40
|
|
|
40
|
|
15517
|
use utf8; |
|
40
|
|
|
|
|
68
|
|
|
40
|
|
|
|
|
341
|
|
3
|
40
|
|
|
40
|
|
1756
|
use strictures; |
|
40
|
|
|
|
|
666
|
|
|
40
|
|
|
|
|
294
|
|
4
|
40
|
|
|
40
|
|
3885
|
use Scalar::Util 'reftype'; |
|
40
|
|
|
|
|
63
|
|
|
40
|
|
|
|
|
3156
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
BEGIN { |
7
|
40
|
|
|
40
|
|
876
|
$Net::Gnats::Command::VERSION = '0.21'; |
8
|
|
|
|
|
|
|
} |
9
|
40
|
|
|
40
|
|
220
|
use vars qw($VERSION); |
|
40
|
|
|
|
|
64
|
|
|
40
|
|
|
|
|
4458
|
|
10
|
|
|
|
|
|
|
|
11
|
40
|
|
|
40
|
|
16541
|
use Net::Gnats::Response; |
|
40
|
|
|
|
|
80
|
|
|
40
|
|
|
|
|
1619
|
|
12
|
40
|
|
|
40
|
|
20064
|
use Net::Gnats::Command::ADMV; |
|
40
|
|
|
|
|
93
|
|
|
40
|
|
|
|
|
1316
|
|
13
|
40
|
|
|
40
|
|
17309
|
use Net::Gnats::Command::APPN; |
|
40
|
|
|
|
|
94
|
|
|
40
|
|
|
|
|
1340
|
|
14
|
40
|
|
|
40
|
|
16144
|
use Net::Gnats::Command::CHDB; |
|
40
|
|
|
|
|
82
|
|
|
40
|
|
|
|
|
1247
|
|
15
|
40
|
|
|
40
|
|
15572
|
use Net::Gnats::Command::CHEK; |
|
40
|
|
|
|
|
1091
|
|
|
40
|
|
|
|
|
1555
|
|
16
|
40
|
|
|
40
|
|
16716
|
use Net::Gnats::Command::DBLS; |
|
40
|
|
|
|
|
80
|
|
|
40
|
|
|
|
|
1408
|
|
17
|
40
|
|
|
40
|
|
16554
|
use Net::Gnats::Command::DBDESC; |
|
40
|
|
|
|
|
70
|
|
|
40
|
|
|
|
|
1362
|
|
18
|
40
|
|
|
40
|
|
15772
|
use Net::Gnats::Command::DELETE; |
|
40
|
|
|
|
|
78
|
|
|
40
|
|
|
|
|
1533
|
|
19
|
40
|
|
|
40
|
|
16667
|
use Net::Gnats::Command::EDIT; |
|
40
|
|
|
|
|
77
|
|
|
40
|
|
|
|
|
1465
|
|
20
|
40
|
|
|
40
|
|
16431
|
use Net::Gnats::Command::EDITADDR; |
|
40
|
|
|
|
|
109
|
|
|
40
|
|
|
|
|
1434
|
|
21
|
40
|
|
|
40
|
|
15982
|
use Net::Gnats::Command::EXPR; |
|
40
|
|
|
|
|
81
|
|
|
40
|
|
|
|
|
1548
|
|
22
|
40
|
|
|
40
|
|
16414
|
use Net::Gnats::Command::FDSC; |
|
40
|
|
|
|
|
88
|
|
|
40
|
|
|
|
|
1607
|
|
23
|
40
|
|
|
40
|
|
16226
|
use Net::Gnats::Command::FIELDFLAGS; |
|
40
|
|
|
|
|
83
|
|
|
40
|
|
|
|
|
1654
|
|
24
|
40
|
|
|
40
|
|
16388
|
use Net::Gnats::Command::FTYP; |
|
40
|
|
|
|
|
93
|
|
|
40
|
|
|
|
|
1711
|
|
25
|
40
|
|
|
40
|
|
17030
|
use Net::Gnats::Command::FTYPINFO; |
|
40
|
|
|
|
|
83
|
|
|
40
|
|
|
|
|
1646
|
|
26
|
40
|
|
|
40
|
|
16072
|
use Net::Gnats::Command::FVLD; |
|
40
|
|
|
|
|
91
|
|
|
40
|
|
|
|
|
1857
|
|
27
|
40
|
|
|
40
|
|
16673
|
use Net::Gnats::Command::INPUTDEFAULT; |
|
40
|
|
|
|
|
82
|
|
|
40
|
|
|
|
|
1674
|
|
28
|
40
|
|
|
40
|
|
15662
|
use Net::Gnats::Command::LIST; |
|
40
|
|
|
|
|
80
|
|
|
40
|
|
|
|
|
1878
|
|
29
|
40
|
|
|
40
|
|
16417
|
use Net::Gnats::Command::LKDB; |
|
40
|
|
|
|
|
91
|
|
|
40
|
|
|
|
|
1748
|
|
30
|
40
|
|
|
40
|
|
16134
|
use Net::Gnats::Command::LOCK; |
|
40
|
|
|
|
|
77
|
|
|
40
|
|
|
|
|
1834
|
|
31
|
40
|
|
|
40
|
|
15774
|
use Net::Gnats::Command::QFMT; |
|
40
|
|
|
|
|
81
|
|
|
40
|
|
|
|
|
1844
|
|
32
|
40
|
|
|
40
|
|
16323
|
use Net::Gnats::Command::QUER; |
|
40
|
|
|
|
|
83
|
|
|
40
|
|
|
|
|
1807
|
|
33
|
40
|
|
|
40
|
|
16294
|
use Net::Gnats::Command::REPL; |
|
40
|
|
|
|
|
90
|
|
|
40
|
|
|
|
|
1942
|
|
34
|
40
|
|
|
40
|
|
16122
|
use Net::Gnats::Command::RSET; |
|
40
|
|
|
|
|
86
|
|
|
40
|
|
|
|
|
2247
|
|
35
|
40
|
|
|
40
|
|
16018
|
use Net::Gnats::Command::SUBM; |
|
40
|
|
|
|
|
90
|
|
|
40
|
|
|
|
|
2074
|
|
36
|
40
|
|
|
40
|
|
16497
|
use Net::Gnats::Command::UNDB; |
|
40
|
|
|
|
|
87
|
|
|
40
|
|
|
|
|
1985
|
|
37
|
40
|
|
|
40
|
|
15483
|
use Net::Gnats::Command::UNLK; |
|
40
|
|
|
|
|
110
|
|
|
40
|
|
|
|
|
1938
|
|
38
|
40
|
|
|
40
|
|
16141
|
use Net::Gnats::Command::USER; |
|
40
|
|
|
|
|
91
|
|
|
40
|
|
|
|
|
2214
|
|
39
|
40
|
|
|
40
|
|
16343
|
use Net::Gnats::Command::VFLD; |
|
40
|
|
|
|
|
93
|
|
|
40
|
|
|
|
|
2094
|
|
40
|
40
|
|
|
40
|
|
15839
|
use Net::Gnats::Command::QUIT; |
|
40
|
|
|
|
|
88
|
|
|
40
|
|
|
|
|
100514
|
|
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
|
16
|
my ($class, %options) = @_; |
80
|
|
|
|
|
|
|
|
81
|
1
|
|
|
|
|
6
|
my $self = bless {}, $class; |
82
|
1
|
|
|
|
|
10
|
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
|
36
|
my ( $self, $value ) = @_; |
95
|
17
|
100
|
|
|
|
100
|
return $self->{field} if not defined $value; |
96
|
4
|
100
|
|
|
|
21
|
return $self->{field} if not defined reftype($value); |
97
|
3
|
100
|
|
|
|
20
|
return $self->{field} if not reftype($value) eq 'HASH'; |
98
|
2
|
100
|
|
|
|
31
|
return $self->{field} if not $value->isa('Net::Gnats::FieldInstance'); |
99
|
|
|
|
|
|
|
|
100
|
1
|
|
|
|
|
3
|
$self->{field} = $value; |
101
|
1
|
|
|
|
|
3
|
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
|
19
|
my ( $self, $value ) = @_; |
116
|
9
|
100
|
|
|
|
37
|
return $self->{field_change_reason} if not defined $value; |
117
|
4
|
100
|
|
|
|
15
|
return $self->{field_change_reason} if not defined reftype($value); |
118
|
3
|
100
|
|
|
|
11
|
return $self->{field_change_reason} if not reftype($value) eq 'HASH'; |
119
|
2
|
100
|
|
|
|
12
|
return $self->{field_change_reason} |
120
|
|
|
|
|
|
|
if not $value->isa('Net::Gnats::FieldInstance'); |
121
|
|
|
|
|
|
|
|
122
|
1
|
|
|
|
|
3
|
$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
|
24
|
my ( $self, $value ) = @_; |
134
|
11
|
100
|
|
|
|
56
|
return $self->{pr} if not defined $value; |
135
|
4
|
100
|
|
|
|
19
|
return $self->{pr} if not defined reftype($value); |
136
|
3
|
100
|
|
|
|
13
|
return $self->{pr} if not reftype($value) eq 'HASH'; |
137
|
2
|
100
|
|
|
|
18
|
return $self->{pr} if not $value->isa('Net::Gnats::PR'); |
138
|
|
|
|
|
|
|
|
139
|
1
|
|
|
|
|
3
|
$self->{pr} = $value; |
140
|
1
|
|
|
|
|
4
|
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
|
4
|
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
|
6526
|
my ($self, $value) = @_; |
178
|
6670
|
100
|
|
|
|
13249
|
$self->{response} = $value if defined $value; |
179
|
6670
|
|
|
|
|
16831
|
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
|
2
|
my $self = shift; |
191
|
1
|
|
|
|
|
3
|
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
|
39
|
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
|
3743
|
my ( $self, $value ) = @_; |
220
|
|
|
|
|
|
|
# identify idx of value |
221
|
3648
|
|
|
|
|
2919
|
my @fields = @{ $self->{fields} }; |
|
3648
|
|
|
|
|
12891
|
|
222
|
3648
|
|
|
|
|
7678
|
my ( $index )= grep { $fields[$_] =~ /$value/ } 0..$#fields; |
|
87552
|
|
|
|
|
148196
|
|
223
|
3648
|
|
|
|
|
4710
|
return @{ $self->response->as_list }[$index]; |
|
3648
|
|
|
|
|
5659
|
|
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
|
2
|
sub admv { shift; return Net::Gnats::Command::ADMV->new( @_ ); } |
|
1
|
|
|
|
|
3
|
|
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
|
18
|
sub appn { shift; return Net::Gnats::Command::APPN->new( @_ ); } |
|
4
|
|
|
|
|
12
|
|
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
|
4
|
sub chdb { shift; return Net::Gnats::Command::CHDB->new( @_ ); } |
|
2
|
|
|
|
|
14
|
|
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
|
1
|
sub chek { shift; return Net::Gnats::Command::CHEK->new( @_ ); } |
|
1
|
|
|
|
|
4
|
|
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
|
20
|
sub dbls { shift; return Net::Gnats::Command::DBLS->new( @_ ); } |
|
7
|
|
|
|
|
42
|
|
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
|
16
|
sub dbdesc { shift; return Net::Gnats::Command::DBDESC->new( @_ ); } |
|
3
|
|
|
|
|
20
|
|
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
|
|
|
|
|
7
|
|
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
|
17
|
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
|
12
|
sub editaddr { shift; return Net::Gnats::Command::EDITADDR->new( @_ ); } |
|
4
|
|
|
|
|
27
|
|
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
|
34
|
sub expr { shift; return Net::Gnats::Command::EXPR->new( @_ ); } |
|
7
|
|
|
|
|
52
|
|
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
|
82
|
sub fdsc { shift; return Net::Gnats::Command::FDSC->new( @_ ); } |
|
41
|
|
|
|
|
368
|
|
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
|
78
|
sub fieldflags { shift; return Net::Gnats::Command::FIELDFLAGS->new( @_ ); } |
|
41
|
|
|
|
|
395
|
|
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
|
166
|
sub ftyp { shift; return Net::Gnats::Command::FTYP->new( @_ ); } |
|
46
|
|
|
|
|
466
|
|
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
|
18
|
sub ftypinfo { shift; return Net::Gnats::Command::FTYPINFO->new( @_ ); } |
|
3
|
|
|
|
|
16
|
|
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
|
10
|
sub fvld { shift; return Net::Gnats::Command::FVLD->new( @_ ); } |
|
3
|
|
|
|
|
18
|
|
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
|
113
|
sub inputdefault { shift; return Net::Gnats::Command::INPUTDEFAULT->new( @_ ); } |
|
41
|
|
|
|
|
400
|
|
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
|
190
|
sub list { shift; return Net::Gnats::Command::LIST->new( @_ ); } |
|
133
|
|
|
|
|
636
|
|
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
|
10
|
sub lkdb { shift; return Net::Gnats::Command::LKDB->new( @_ ); } |
|
4
|
|
|
|
|
10
|
|
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
|
30
|
sub lock_pr { shift; return Net::Gnats::Command::LOCK->new( @_ ); } |
|
9
|
|
|
|
|
43
|
|
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
|
34
|
sub qfmt { shift; return Net::Gnats::Command::QFMT->new( @_ ); } |
|
15
|
|
|
|
|
85
|
|
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
|
25
|
sub quer { shift; return Net::Gnats::Command::QUER->new( @_ ); } |
|
15
|
|
|
|
|
73
|
|
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
|
|
|
|
|
38
|
|
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
|
23
|
sub repl { shift; return Net::Gnats::Command::REPL->new( @_ ); } |
|
9
|
|
|
|
|
41
|
|
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
|
27
|
sub rset { shift; return Net::Gnats::Command::RSET->new( @_ ); } |
|
13
|
|
|
|
|
82
|
|
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
|
24
|
sub subm { shift; return Net::Gnats::Command::SUBM->new( @_ ); } |
|
7
|
|
|
|
|
40
|
|
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
|
6
|
sub undb { shift; return Net::Gnats::Command::UNDB->new( @_ ); } |
|
1
|
|
|
|
|
12
|
|
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
|
15
|
sub unlk { shift; return Net::Gnats::Command::UNLK->new( @_ ); } |
|
4
|
|
|
|
|
29
|
|
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
|
165
|
sub user { shift; return Net::Gnats::Command::USER->new( @_ ); } |
|
85
|
|
|
|
|
518
|
|
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
|
6
|
sub vfld { shift; return Net::Gnats::Command::VFLD->new( @_ ); } |
|
2
|
|
|
|
|
8
|
|
615
|
|
|
|
|
|
|
|
616
|
|
|
|
|
|
|
|
617
|
|
|
|
|
|
|
1; |