line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::Gnats::Command::RSET; |
2
|
40
|
|
|
40
|
|
173
|
use parent 'Net::Gnats::Command'; |
|
40
|
|
|
|
|
54
|
|
|
40
|
|
|
|
|
178
|
|
3
|
40
|
|
|
40
|
|
2360
|
use strictures; |
|
40
|
|
|
|
|
54
|
|
|
40
|
|
|
|
|
176
|
|
4
|
|
|
|
|
|
|
BEGIN { |
5
|
40
|
|
|
40
|
|
2962
|
$Net::Gnats::Command::RSET::VERSION = '0.20'; |
6
|
|
|
|
|
|
|
} |
7
|
40
|
|
|
40
|
|
355
|
use vars qw($VERSION); |
|
40
|
|
|
|
|
58
|
|
|
40
|
|
|
|
|
1463
|
|
8
|
|
|
|
|
|
|
|
9
|
40
|
|
|
40
|
|
175
|
use Net::Gnats::Constants qw(CODE_OK CODE_CMD_ERROR); |
|
40
|
|
|
|
|
54
|
|
|
40
|
|
|
|
|
7257
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=head1 NAME |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
Net::Gnats::Command::RSET |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
=head1 DESCRIPTION |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
Used to reset the internal server state. The current query expression |
18
|
|
|
|
|
|
|
is cleared, and the index of PRs may be reread if it has been updated |
19
|
|
|
|
|
|
|
since the start of the session. |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=head1 PROTOCOL |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
RSET |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=head1 RESPONSES |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
The possible responses are: |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
210 (CODE_OK) |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
The state has been reset. |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
440 (CODE_CMD_ERROR) |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
One or more arguments were supplied to the command. |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
6xx (internal error) |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
There were problems resetting the state (usually because the index |
40
|
|
|
|
|
|
|
could not be reread). The session will be immediately terminated. |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=cut |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
my $c = 'RSET'; |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
sub new { |
47
|
12
|
|
|
12
|
1
|
31
|
my ( $class, %options ) = @_; |
48
|
|
|
|
|
|
|
|
49
|
12
|
|
|
|
|
54
|
my $self = bless {}, $class; |
50
|
12
|
|
|
|
|
93
|
return $self; |
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
sub as_string { |
54
|
28
|
|
|
28
|
1
|
37
|
my $self = shift; |
55
|
28
|
|
|
|
|
98
|
return $c; |
56
|
|
|
|
|
|
|
} |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
sub is_ok { |
59
|
14
|
|
|
14
|
0
|
26
|
my $self = shift; |
60
|
14
|
50
|
|
|
|
39
|
return 0 if not defined $self->response; |
61
|
14
|
50
|
|
|
|
57
|
return 0 if not defined $self->response->code; |
62
|
14
|
100
|
|
|
|
42
|
return 1 if $self->response->code == CODE_OK; |
63
|
2
|
|
|
|
|
9
|
return 0; |
64
|
|
|
|
|
|
|
} |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
1; |