line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Goo::DatabaseThing::Deleter; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
############################################################################### |
4
|
|
|
|
|
|
|
# Nigel Hamilton |
5
|
|
|
|
|
|
|
# |
6
|
|
|
|
|
|
|
# Copyright Nigel Hamilton 2005 |
7
|
|
|
|
|
|
|
# All Rights Reserved |
8
|
|
|
|
|
|
|
# |
9
|
|
|
|
|
|
|
# Author: Nigel Hamilton |
10
|
|
|
|
|
|
|
# Filename: Goo::DatabaseThing::Deleter.pm |
11
|
|
|
|
|
|
|
# Description: Delete a row from a table |
12
|
|
|
|
|
|
|
# |
13
|
|
|
|
|
|
|
# Date Change |
14
|
|
|
|
|
|
|
# ----------------------------------------------------------------------------- |
15
|
|
|
|
|
|
|
# 16/10/2005 Auto generated file |
16
|
|
|
|
|
|
|
# 16/10/2005 Need to create a Table |
17
|
|
|
|
|
|
|
# |
18
|
|
|
|
|
|
|
############################################################################### |
19
|
|
|
|
|
|
|
|
20
|
1
|
|
|
1
|
|
3194
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
35
|
|
21
|
|
|
|
|
|
|
|
22
|
1
|
|
|
1
|
|
6
|
use Goo::Object; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
18
|
|
23
|
1
|
|
|
1
|
|
5
|
use Goo::Prompter; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
20
|
|
24
|
1
|
|
|
1
|
|
5
|
use base qw(Goo::Object); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
203
|
|
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
############################################################################### |
28
|
|
|
|
|
|
|
# |
29
|
|
|
|
|
|
|
# run - edit a task |
30
|
|
|
|
|
|
|
# |
31
|
|
|
|
|
|
|
############################################################################### |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub run { |
34
|
|
|
|
|
|
|
|
35
|
0
|
|
|
0
|
1
|
|
my ($this, $thing) = @_; |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
# grab the task |
38
|
0
|
|
|
|
|
|
my $dbo = $thing->get_database_object(); |
39
|
|
|
|
|
|
|
|
40
|
0
|
0
|
|
|
|
|
if (Goo::Prompter::confirm("Delete " . $thing->get_filename())) { |
41
|
|
|
|
|
|
|
|
42
|
0
|
|
|
|
|
|
$dbo->delete(); |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
# need to go somewhere else now - back to the Zone |
45
|
0
|
|
|
|
|
|
$thing->do_action("Z"); |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
1; |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
__END__ |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=head1 NAME |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
Goo::DatabaseThing::Deleter - Delete a row from a database table |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head1 SYNOPSIS |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
use Goo::DatabaseThing::Deleter; |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head1 DESCRIPTION |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=head1 METHODS |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=over |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=item run |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
edit a task |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=back |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
=head1 AUTHOR |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
Nigel Hamilton <nigel@trexy.com> |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=head1 SEE ALSO |
82
|
|
|
|
|
|
|
|