Gnats/Command.pm

filter: Statementstmt 100% 202 / 202 Branchbran 100% 26 / 26 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 74 / 74 Podpod 100% 39 / 39 totaltotal 100% 341 / 341 CC 14 SCAR 5.4
CC
14
Cov
100%
field
5.0
field_change_reason
5.0
pr
5.0
CRAP 1.7
« Gnats/Command/UNLK.pm ↑ Summary Gnats/Command/UNDB.pm »
1 package Net::Gnats::Command;
2 40 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 40 ▶use strictures;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 40 ▶use Scalar::Util 'reftype';
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 40 ▶BEGIN {
Subroutine BEGIN: called CC=1 SCAR=0.0
7 40 $Net::Gnats::Command::VERSION = '0.22';
8 }
9 40 ▶use vars qw($VERSION);
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 40 ▶use Net::Gnats::Response;
Subroutine BEGIN: called CC=1 SCAR=0.0
12 40 ▶use Net::Gnats::Command::ADMV;
Subroutine BEGIN: called CC=1 SCAR=0.0
13 40 ▶use Net::Gnats::Command::APPN;
Subroutine BEGIN: called CC=1 SCAR=0.0
14 40 ▶use Net::Gnats::Command::CHDB;
Subroutine BEGIN: called CC=1 SCAR=0.0
15 40 ▶use Net::Gnats::Command::CHEK;
Subroutine BEGIN: called CC=1 SCAR=0.0
16 40 ▶use Net::Gnats::Command::DBLS;
Subroutine BEGIN: called CC=1 SCAR=0.0
17 40 ▶use Net::Gnats::Command::DBDESC;
Subroutine BEGIN: called CC=1 SCAR=0.0
18 40 ▶use Net::Gnats::Command::DELETE;
Subroutine BEGIN: called CC=1 SCAR=0.0
19 40 ▶use Net::Gnats::Command::EDIT;
Subroutine BEGIN: called CC=1 SCAR=0.0
20 40 ▶use Net::Gnats::Command::EDITADDR;
Subroutine BEGIN: called CC=1 SCAR=0.0
21 40 ▶use Net::Gnats::Command::EXPR;
Subroutine BEGIN: called CC=1 SCAR=0.0
22 40 ▶use Net::Gnats::Command::FDSC;
Subroutine BEGIN: called CC=1 SCAR=0.0
23 40 ▶use Net::Gnats::Command::FIELDFLAGS;
Subroutine BEGIN: called CC=1 SCAR=0.0
24 40 ▶use Net::Gnats::Command::FTYP;
Subroutine BEGIN: called CC=1 SCAR=0.0
25 40 ▶use Net::Gnats::Command::FTYPINFO;
Subroutine BEGIN: called CC=1 SCAR=0.0
26 40 ▶use Net::Gnats::Command::FVLD;
Subroutine BEGIN: called CC=1 SCAR=0.0
27 40 ▶use Net::Gnats::Command::INPUTDEFAULT;
Subroutine BEGIN: called CC=1 SCAR=0.0
28 40 ▶use Net::Gnats::Command::LIST;
Subroutine BEGIN: called CC=1 SCAR=0.0
29 40 ▶use Net::Gnats::Command::LKDB;
Subroutine BEGIN: called CC=1 SCAR=0.0
30 40 ▶use Net::Gnats::Command::LOCK;
Subroutine BEGIN: called CC=1 SCAR=0.0
31 40 ▶use Net::Gnats::Command::QFMT;
Subroutine BEGIN: called CC=1 SCAR=0.0
32 40 ▶use Net::Gnats::Command::QUER;
Subroutine BEGIN: called CC=1 SCAR=0.0
33 40 ▶use Net::Gnats::Command::REPL;
Subroutine BEGIN: called CC=1 SCAR=0.0
34 40 ▶use Net::Gnats::Command::RSET;
Subroutine BEGIN: called CC=1 SCAR=0.0
35 40 ▶use Net::Gnats::Command::SUBM;
Subroutine BEGIN: called CC=1 SCAR=0.0
36 40 ▶use Net::Gnats::Command::UNDB;
Subroutine BEGIN: called CC=1 SCAR=0.0
37 40 ▶use Net::Gnats::Command::UNLK;
Subroutine BEGIN: called CC=1 SCAR=0.0
38 40 ▶use Net::Gnats::Command::USER;
Subroutine BEGIN: called CC=1 SCAR=0.0
39 40 ▶use Net::Gnats::Command::VFLD;
Subroutine BEGIN: called CC=1 SCAR=0.0
40 40 ▶use Net::Gnats::Command::QUIT;
Subroutine BEGIN: called CC=1 SCAR=0.0
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 40 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<Net::Gnats::Command> 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 1 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
Pod documented
79 1 my ($class, %options) = @_;
80  
81 1 my $self = bless {}, $class;
82 1 return $self;
83 }
84  
85 =head1 ACCESSORS
86  
87 =head2 field
88  
89 Sets and retrieves a L<Net::Gnats::FieldInstance> to the command.
90  
91 =cut
92  
93 17 ▶sub field {
Subroutine field: called CC=5 SCAR=16.1
Pod documented
94 17 my ( $self, $value ) = @_;
95 17 ▶ return $self->{field} if not defined $value;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $value 13 4 17
96 4 ▶ return $self->{field} if not defined reftype($value);
Branch: 1 branch
BranchTrueFalseTotal
unless defined builtin::reftype($value) 1 3 4
97 3 ▶ return $self->{field} if not reftype($value) eq 'HASH';
Branch: 1 branch
BranchTrueFalseTotal
unless builtin::reftype($value) eq "HASH" 1 2 3
98 2 ▶ return $self->{field} if not $value->isa('Net::Gnats::FieldInstance');
Branch: 1 branch
BranchTrueFalseTotal
unless $value->isa("Net::Gnats::FieldInstance") 1 1 2
99  
100 1 $self->{field} = $value;
101 1 return $self->{field};
102 }
103  
104 =head2 field_change_reason
105  
106 Sets and retrieves a L<Net::Gnats::FieldInstance> 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 9 ▶sub field_change_reason {
Subroutine field_change_reason: called CC=5 SCAR=16.1
Pod documented
115 9 my ( $self, $value ) = @_;
116 9 ▶ return $self->{field_change_reason} if not defined $value;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $value 5 4 9
117 4 ▶ return $self->{field_change_reason} if not defined reftype($value);
Branch: 1 branch
BranchTrueFalseTotal
unless defined builtin::reftype($value) 1 3 4
118 3 ▶ return $self->{field_change_reason} if not reftype($value) eq 'HASH';
Branch: 1 branch
BranchTrueFalseTotal
unless builtin::reftype($value) eq "HASH" 1 2 3
119 return $self->{field_change_reason}
120 2 ▶ if not $value->isa('Net::Gnats::FieldInstance');
Branch: 1 branch
BranchTrueFalseTotal
unless $value->isa("Net::Gnats::FieldInstance") 1 1 2
121  
122 1 $self->{field_change_reason} = $value;
123 1 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 11 ▶sub pr {
Subroutine pr: called CC=5 SCAR=16.1
Pod documented
133 11 my ( $self, $value ) = @_;
134 11 ▶ return $self->{pr} if not defined $value;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $value 7 4 11
135 4 ▶ return $self->{pr} if not defined reftype($value);
Branch: 1 branch
BranchTrueFalseTotal
unless defined builtin::reftype($value) 1 3 4
136 3 ▶ return $self->{pr} if not reftype($value) eq 'HASH';
Branch: 1 branch
BranchTrueFalseTotal
unless builtin::reftype($value) eq "HASH" 1 2 3
137 2 ▶ return $self->{pr} if not $value->isa('Net::Gnats::PR');
Branch: 1 branch
BranchTrueFalseTotal
unless $value->isa("Net::Gnats::PR") 1 1 2
138  
139 1 $self->{pr} = $value;
140 1 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 ▶sub error_codes { shift->{error_codes} }
Subroutine error_codes: called CC=1 SCAR=0.0
Pod documented
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 ▶sub success_codes { shift->{success_codes} }
Subroutine success_codes: called CC=1 SCAR=0.0
Pod documented
163  
164 =head2 response
165  
166 Manages the response outcome from the server encapsulated in a
167 L<Net::Gnats::Response> 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 6670 ▶sub response {
Subroutine response: called CC=2 SCAR=6.9
Pod documented
177 6670 my ($self, $value) = @_;
178 6670 ▶ $self->{response} = $value if defined $value;
Branch: 1 branch
BranchTrueFalseTotal
if defined $value 524 6146 6670
179 6670 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 1 ▶sub requests_multi {
Subroutine requests_multi: called CC=1 SCAR=0.0
Pod documented
190 1 my $self = shift;
191 1 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 10 ▶sub as_string {
Subroutine as_string: called CC=1 SCAR=0.0
Pod documented
204 10 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 3648 ▶sub from {
Subroutine from: called CC=1 SCAR=0.0
Pod documented
219 3648 my ( $self, $value ) = @_;
220 # identify idx of value
221 3648 my @fields = @{ $self->{fields} };
222 3648 my ( $index )= grep { $fields[$_] =~ /$value/ } 0..$#fields;
223 3648 return @{ $self->response->as_list }[$index];
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 ▶sub admv { shift; return Net::Gnats::Command::ADMV->new( @_ ); }
Subroutine admv: called CC=1 SCAR=0.0
Pod documented
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<Net::Gnats::FieldInstance> object.
243  
244 $c = Net::Gnats::Command->appn( pr_number => 5, field => $field );
245  
246 See L<Net::Gnats::Command::APPN> for details.
247  
248 =cut
249  
250 4 ▶sub appn { shift; return Net::Gnats::Command::APPN->new( @_ ); }
Subroutine appn: called CC=1 SCAR=0.0
Pod documented
251  
252 =head2 chdb
253  
254 Manages the command for changing databases within the same
255 L<Net::Gnats::Session> instance.
256  
257 $c = Net::Gnats::Command->chdb( database => 'external' );
258  
259 See L<Net::Gnats::Command::CHDB> for details.
260  
261 =cut
262  
263 2 ▶sub chdb { shift; return Net::Gnats::Command::CHDB->new( @_ ); }
Subroutine chdb: called CC=1 SCAR=0.0
Pod documented
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<Net::Gnats::Command::CHEK> for details.
276  
277 =cut
278  
279 1 ▶sub chek { shift; return Net::Gnats::Command::CHEK->new( @_ ); }
Subroutine chek: called CC=1 SCAR=0.0
Pod documented
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<Net::Gnats::Command::DBLS> for details.
289  
290 =cut
291  
292 7 ▶sub dbls { shift; return Net::Gnats::Command::DBLS->new( @_ ); }
Subroutine dbls: called CC=1 SCAR=0.0
Pod documented
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<Net::Gnats::Command::DBDESC> for details.
302  
303 =cut
304  
305 3 ▶sub dbdesc { shift; return Net::Gnats::Command::DBDESC->new( @_ ); }
Subroutine dbdesc: called CC=1 SCAR=0.0
Pod documented
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<Net::Gnats::Command::DELETE> for details.
315  
316 =cut
317  
318 1 ▶sub delete_pr { shift; return Net::Gnats::Command::DELETE->new( @_ ); }
Subroutine delete_pr: called CC=1 SCAR=0.0
Pod documented
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<Net::Gnats::Command::EDIT> for details.
327  
328 =cut
329  
330 5 ▶sub edit { shift; return Net::Gnats::Command::EDIT->new( @_ ); }
Subroutine edit: called CC=1 SCAR=0.0
Pod documented
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<Net::Gnats::Command::EDITADDR> for details.
341  
342 =cut
343  
344 4 ▶sub editaddr { shift; return Net::Gnats::Command::EDITADDR->new( @_ ); }
Subroutine editaddr: called CC=1 SCAR=0.0
Pod documented
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<Net::Gnats::Command::EXPR> for details.
356  
357 =cut
358  
359 7 ▶sub expr { shift; return Net::Gnats::Command::EXPR->new( @_ ); }
Subroutine expr: called CC=1 SCAR=0.0
Pod documented
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<Net::Gnats::Command::FDSC> for details.
369  
370 =cut
371  
372 41 ▶sub fdsc { shift; return Net::Gnats::Command::FDSC->new( @_ ); }
Subroutine fdsc: called CC=1 SCAR=0.0
Pod documented
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<Net::Gnats::Command::FIELDFLAGS> for details.
382  
383 =cut
384  
385 41 ▶sub fieldflags { shift; return Net::Gnats::Command::FIELDFLAGS->new( @_ ); }
Subroutine fieldflags: called CC=1 SCAR=0.0
Pod documented
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<Net::Gnats::Command::FTYP> for details.
395  
396 =cut
397  
398 46 ▶sub ftyp { shift; return Net::Gnats::Command::FTYP->new( @_ ); }
Subroutine ftyp: called CC=1 SCAR=0.0
Pod documented
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<Net::Gnats::Command::FTYPINFO> for details.
410  
411 =cut
412  
413 3 ▶sub ftypinfo { shift; return Net::Gnats::Command::FTYPINFO->new( @_ ); }
Subroutine ftypinfo: called CC=1 SCAR=0.0
Pod documented
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<Net::Gnats::Command::FVLD> for details.
423  
424 =cut
425  
426 3 ▶sub fvld { shift; return Net::Gnats::Command::FVLD->new( @_ ); }
Subroutine fvld: called CC=1 SCAR=0.0
Pod documented
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<Net::Gnats::Command::INPUTDEFAULT> for details.
436  
437 =cut
438  
439 41 ▶sub inputdefault { shift; return Net::Gnats::Command::INPUTDEFAULT->new( @_ ); }
Subroutine inputdefault: called CC=1 SCAR=0.0
Pod documented
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<Net::Gnats::Command::LIST> for details.
455  
456 =cut
457  
458 133 ▶sub list { shift; return Net::Gnats::Command::LIST->new( @_ ); }
Subroutine list: called CC=1 SCAR=0.0
Pod documented
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<Net::Gnats::Command::LKDB> for details.
467  
468 =cut
469  
470 4 ▶sub lkdb { shift; return Net::Gnats::Command::LKDB->new( @_ ); }
Subroutine lkdb: called CC=1 SCAR=0.0
Pod documented
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<Net::Gnats::Command::LOCK> for details.
481  
482 =cut
483  
484 9 ▶sub lock_pr { shift; return Net::Gnats::Command::LOCK->new( @_ ); }
Subroutine lock_pr: called CC=1 SCAR=0.0
Pod documented
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<Net::Gnats::Command::QFMT> for details.
495  
496 =cut
497  
498 15 ▶sub qfmt { shift; return Net::Gnats::Command::QFMT->new( @_ ); }
Subroutine qfmt: called CC=1 SCAR=0.0
Pod documented
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<Net::Gnats::Command::QUER> for details.
511  
512 =cut
513  
514 15 ▶sub quer { shift; return Net::Gnats::Command::QUER->new( @_ ); }
Subroutine quer: called CC=1 SCAR=0.0
Pod documented
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<Net::Gnats::Command::QUIT> for details.
523  
524 =cut
525  
526 5 ▶sub quit { shift; return Net::Gnats::Command::QUIT->new( @_ ); }
Subroutine quit: called CC=1 SCAR=0.0
Pod documented
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<Net::Gnats::Command::REPL> for details.
535  
536 =cut
537  
538 9 ▶sub repl { shift; return Net::Gnats::Command::REPL->new( @_ ); }
Subroutine repl: called CC=1 SCAR=0.0
Pod documented
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<Net::Gnats::Command::RSET> for details.
548  
549 =cut
550  
551 13 ▶sub rset { shift; return Net::Gnats::Command::RSET->new( @_ ); }
Subroutine rset: called CC=1 SCAR=0.0
Pod documented
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<Net::Gnats::Command::SUBM> for details.
561  
562 =cut
563  
564 7 ▶sub subm { shift; return Net::Gnats::Command::SUBM->new( @_ ); }
Subroutine subm: called CC=1 SCAR=0.0
Pod documented
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<Net::Gnats::Command::UNDB> for details.
573  
574 =cut
575  
576 1 ▶sub undb { shift; return Net::Gnats::Command::UNDB->new( @_ ); }
Subroutine undb: called CC=1 SCAR=0.0
Pod documented
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<Net::Gnats::Command::UNLK> for details.
585  
586 =cut
587  
588 4 ▶sub unlk { shift; return Net::Gnats::Command::UNLK->new( @_ ); }
Subroutine unlk: called CC=1 SCAR=0.0
Pod documented
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<Net::Gnats::Command::USER> for details.
597  
598 =cut
599  
600 85 ▶sub user { shift; return Net::Gnats::Command::USER->new( @_ ); }
Subroutine user: called CC=1 SCAR=0.0
Pod documented
601  
602 =head2 vfld
603  
604 Manages the command for validating a specific field. The field is a
605 L<Net::Gnats::FieldInstance> 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<Net::Gnats::Command::VFLD> for details.
611  
612 =cut
613  
614 2 ▶sub vfld { shift; return Net::Gnats::Command::VFLD->new( @_ ); }
Subroutine vfld: called CC=1 SCAR=0.0
Pod documented
615  
616  
617 40 1;
« Gnats/Command/UNLK.pm ↑ Summary Gnats/Command/UNDB.pm »