line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::Gnats::Command::UNDB; |
2
|
40
|
|
|
40
|
|
187
|
use parent 'Net::Gnats::Command'; |
|
40
|
|
|
|
|
62
|
|
|
40
|
|
|
|
|
231
|
|
3
|
40
|
|
|
40
|
|
2306
|
use strictures; |
|
40
|
|
|
|
|
64
|
|
|
40
|
|
|
|
|
194
|
|
4
|
|
|
|
|
|
|
BEGIN { |
5
|
40
|
|
|
40
|
|
3667
|
$Net::Gnats::Command::UNDB::VERSION = '0.21'; |
6
|
|
|
|
|
|
|
} |
7
|
40
|
|
|
40
|
|
207
|
use vars qw($VERSION); |
|
40
|
|
|
|
|
75
|
|
|
40
|
|
|
|
|
2182
|
|
8
|
|
|
|
|
|
|
|
9
|
40
|
|
|
40
|
|
222
|
use Net::Gnats::Constants qw(CODE_OK CODE_GNATS_NOT_LOCKED CODE_CMD_ERROR); |
|
40
|
|
|
|
|
59
|
|
|
40
|
|
|
|
|
7094
|
|
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
|
|
|
|
|
4
|
return $self; |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
sub as_string { |
50
|
8
|
|
|
8
|
1
|
25
|
return $c; |
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
sub is_ok { |
54
|
4
|
|
|
4
|
0
|
6
|
my $self = shift; |
55
|
4
|
50
|
|
|
|
8
|
return 0 if not defined $self->response; |
56
|
4
|
100
|
|
|
|
11
|
return 1 if $self->response->code == CODE_OK; |
57
|
3
|
|
|
|
|
9
|
return 0; |
58
|
|
|
|
|
|
|
} |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
1; |