line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::Gnats::Command::RSET; |
2
|
40
|
|
|
40
|
|
207
|
use parent 'Net::Gnats::Command'; |
|
40
|
|
|
|
|
67
|
|
|
40
|
|
|
|
|
218
|
|
3
|
40
|
|
|
40
|
|
2225
|
use strictures; |
|
40
|
|
|
|
|
71
|
|
|
40
|
|
|
|
|
214
|
|
4
|
|
|
|
|
|
|
BEGIN { |
5
|
40
|
|
|
40
|
|
9157
|
$Net::Gnats::Command::RSET::VERSION = '0.22'; |
6
|
|
|
|
|
|
|
} |
7
|
40
|
|
|
40
|
|
205
|
use vars qw($VERSION); |
|
40
|
|
|
|
|
86
|
|
|
40
|
|
|
|
|
1626
|
|
8
|
|
|
|
|
|
|
|
9
|
40
|
|
|
40
|
|
203
|
use Net::Gnats::Constants qw(CODE_OK CODE_CMD_ERROR); |
|
40
|
|
|
|
|
67
|
|
|
40
|
|
|
|
|
8282
|
|
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
|
13
|
|
|
13
|
1
|
29
|
my ( $class, %options ) = @_; |
48
|
|
|
|
|
|
|
|
49
|
13
|
|
|
|
|
30
|
my $self = bless {}, $class; |
50
|
13
|
|
|
|
|
66
|
return $self; |
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
sub as_string { |
54
|
30
|
|
|
30
|
1
|
42
|
my $self = shift; |
55
|
30
|
|
|
|
|
108
|
return $c; |
56
|
|
|
|
|
|
|
} |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
sub is_ok { |
59
|
15
|
|
|
15
|
0
|
25
|
my $self = shift; |
60
|
15
|
50
|
|
|
|
53
|
return 0 if not defined $self->response; |
61
|
15
|
50
|
|
|
|
49
|
return 0 if not defined $self->response->code; |
62
|
15
|
100
|
|
|
|
50
|
return 1 if $self->response->code == CODE_OK; |
63
|
2
|
|
|
|
|
11
|
return 0; |
64
|
|
|
|
|
|
|
} |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
1; |