line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::Gnats::Command::UNDB; |
2
|
40
|
|
|
40
|
|
163
|
use parent 'Net::Gnats::Command'; |
|
40
|
|
|
|
|
50
|
|
|
40
|
|
|
|
|
219
|
|
3
|
40
|
|
|
40
|
|
2091
|
use strictures; |
|
40
|
|
|
|
|
59
|
|
|
40
|
|
|
|
|
171
|
|
4
|
|
|
|
|
|
|
BEGIN { |
5
|
40
|
|
|
40
|
|
3005
|
$Net::Gnats::Command::UNDB::VERSION = '0.20'; |
6
|
|
|
|
|
|
|
} |
7
|
40
|
|
|
40
|
|
177
|
use vars qw($VERSION); |
|
40
|
|
|
|
|
62
|
|
|
40
|
|
|
|
|
1511
|
|
8
|
|
|
|
|
|
|
|
9
|
40
|
|
|
40
|
|
190
|
use Net::Gnats::Constants qw(CODE_OK CODE_GNATS_NOT_LOCKED CODE_CMD_ERROR); |
|
40
|
|
|
|
|
59
|
|
|
40
|
|
|
|
|
6148
|
|
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
|
2
|
my ( $class ) = @_; |
44
|
|
|
|
|
|
|
|
45
|
1
|
|
|
|
|
4
|
my $self = bless {}, $class; |
46
|
1
|
|
|
|
|
2
|
return $self; |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
sub as_string { |
50
|
8
|
|
|
8
|
1
|
21
|
return $c; |
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
sub is_ok { |
54
|
4
|
|
|
4
|
0
|
6
|
my $self = shift; |
55
|
4
|
50
|
|
|
|
7
|
return 0 if not defined $self->response; |
56
|
4
|
100
|
|
|
|
8
|
return 1 if $self->response->code == CODE_OK; |
57
|
3
|
|
|
|
|
12
|
return 0; |
58
|
|
|
|
|
|
|
} |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
1; |