line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::Gnats::Command::UNDB; |
2
|
40
|
|
|
40
|
|
201
|
use parent 'Net::Gnats::Command'; |
|
40
|
|
|
|
|
73
|
|
|
40
|
|
|
|
|
215
|
|
3
|
40
|
|
|
40
|
|
2203
|
use strictures; |
|
40
|
|
|
|
|
73
|
|
|
40
|
|
|
|
|
237
|
|
4
|
|
|
|
|
|
|
BEGIN { |
5
|
40
|
|
|
40
|
|
8973
|
$Net::Gnats::Command::UNDB::VERSION = '0.22'; |
6
|
|
|
|
|
|
|
} |
7
|
40
|
|
|
40
|
|
209
|
use vars qw($VERSION); |
|
40
|
|
|
|
|
69
|
|
|
40
|
|
|
|
|
1634
|
|
8
|
|
|
|
|
|
|
|
9
|
40
|
|
|
40
|
|
207
|
use Net::Gnats::Constants qw(CODE_OK CODE_GNATS_NOT_LOCKED CODE_CMD_ERROR); |
|
40
|
|
|
|
|
70
|
|
|
40
|
|
|
|
|
7615
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=head1 NAME |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
Net::Gnats::Command::UNDB |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
=head1 DESCRIPTION |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
Unlocks the database. Any session may steal a database lock; no |
18
|
|
|
|
|
|
|
checking of any sort is done. |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=head1 PROTOCOL |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
UNDB |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=head1 RESPONSES |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
The possible responses are: |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
200 (CODE_OK) The lock has been removed. |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
432 (CODE_GNATS_NOT_LOCKED) The database was not locked. |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
440 (CODE_CMD_ERROR) One or more arguments were supplied to the |
33
|
|
|
|
|
|
|
command. |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
6xx (internal error) The database lock could not be removed, usually |
36
|
|
|
|
|
|
|
because of permissions or other filesystem-related issues. |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=cut |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
my $c = 'UNDB'; |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
sub new { |
43
|
1
|
|
|
1
|
1
|
3
|
my ( $class ) = @_; |
44
|
|
|
|
|
|
|
|
45
|
1
|
|
|
|
|
3
|
my $self = bless {}, $class; |
46
|
1
|
|
|
|
|
3
|
return $self; |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
sub as_string { |
50
|
8
|
|
|
8
|
1
|
33
|
return $c; |
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
sub is_ok { |
54
|
4
|
|
|
4
|
0
|
6
|
my $self = shift; |
55
|
4
|
50
|
|
|
|
15
|
return 0 if not defined $self->response; |
56
|
4
|
100
|
|
|
|
14
|
return 1 if $self->response->code == CODE_OK; |
57
|
3
|
|
|
|
|
14
|
return 0; |
58
|
|
|
|
|
|
|
} |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
1; |