line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package App::bif::drop::change; |
2
|
1
|
|
|
1
|
|
3985
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
27
|
|
3
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
32
|
|
4
|
1
|
|
|
1
|
|
5
|
use Bif::Mo; |
|
1
|
|
|
|
|
7
|
|
|
1
|
|
|
|
|
8
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '0.1.5_7'; |
7
|
|
|
|
|
|
|
extends 'App::bif'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub run { |
10
|
1
|
|
|
1
|
1
|
2
|
my $self = shift; |
11
|
1
|
|
|
|
|
8
|
my $opts = $self->opts; |
12
|
1
|
|
|
|
|
8
|
my $dbw = $self->dbw; |
13
|
0
|
|
|
|
|
|
my $info = $self->get_change( $opts->{uid} ); |
14
|
|
|
|
|
|
|
|
15
|
0
|
0
|
|
|
|
|
if ( !$opts->{force} ) { |
16
|
0
|
|
|
|
|
|
print "Nothing dropped (missing --force, -f)\n"; |
17
|
0
|
|
|
|
|
|
return $self->ok('DropNoForce'); |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
0
|
|
|
|
|
|
my $uuid = substr( $info->{uuid}, 0, 8 ); |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
$dbw->txn( |
23
|
|
|
|
|
|
|
sub { |
24
|
|
|
|
|
|
|
$dbw->xdo( |
25
|
|
|
|
|
|
|
delete_from => 'changes', |
26
|
|
|
|
|
|
|
where => { id => $info->{id} }, |
27
|
0
|
|
|
0
|
|
|
); |
28
|
|
|
|
|
|
|
|
29
|
0
|
|
|
|
|
|
print "Change dropped: c$info->{id} <$uuid>\n"; |
30
|
|
|
|
|
|
|
} |
31
|
0
|
|
|
|
|
|
); |
32
|
|
|
|
|
|
|
|
33
|
0
|
|
|
|
|
|
return $self->ok('DropChange'); |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
1; |
37
|
|
|
|
|
|
|
__END__ |