line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# -*- Mode: cperl; mode: folding; -*- |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
package Goo::Thing::task::Maker; |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
############################################################################### |
6
|
|
|
|
|
|
|
# Turbo10.com |
7
|
|
|
|
|
|
|
# |
8
|
|
|
|
|
|
|
# Copyright Turbo10.com 2005 |
9
|
|
|
|
|
|
|
# All Rights Reserved |
10
|
|
|
|
|
|
|
# |
11
|
|
|
|
|
|
|
# Author: Nigel Hamilton |
12
|
|
|
|
|
|
|
# Filename: Maker.pm |
13
|
|
|
|
|
|
|
# Description: Make a task module |
14
|
|
|
|
|
|
|
# |
15
|
|
|
|
|
|
|
# Date Change |
16
|
|
|
|
|
|
|
# ----------------------------------------------------------------------------- |
17
|
|
|
|
|
|
|
# 16/10/2005 Auto generated file |
18
|
|
|
|
|
|
|
# 16/10/2005 Need to create a task object |
19
|
|
|
|
|
|
|
# |
20
|
|
|
|
|
|
|
############################################################################### |
21
|
|
|
|
|
|
|
|
22
|
1
|
|
|
1
|
|
3196
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
30
|
|
23
|
|
|
|
|
|
|
|
24
|
1
|
|
|
1
|
|
6
|
use Goo::Object; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
22
|
|
25
|
1
|
|
|
1
|
|
7
|
use Goo::Header; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
25
|
|
26
|
1
|
|
|
1
|
|
5
|
use Goo::Prompter; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
17
|
|
27
|
1
|
|
|
1
|
|
5
|
use Goo::Database; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
18
|
|
28
|
1
|
|
|
1
|
|
5
|
use Goo::Prompter; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
15
|
|
29
|
1
|
|
|
1
|
|
4
|
use Goo::TeamManager; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
21
|
|
30
|
|
|
|
|
|
|
|
31
|
1
|
|
|
1
|
|
5
|
use base qw(Goo::Object); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
227
|
|
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
############################################################################### |
35
|
|
|
|
|
|
|
# |
36
|
|
|
|
|
|
|
# run - make a task_maker |
37
|
|
|
|
|
|
|
# |
38
|
|
|
|
|
|
|
############################################################################### |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub run { |
41
|
|
|
|
|
|
|
|
42
|
0
|
|
|
0
|
1
|
|
my ($this, $filename) = @_; |
43
|
|
|
|
|
|
|
|
44
|
0
|
|
|
|
|
|
Goo::Header::show($filename, "database"); |
45
|
|
|
|
|
|
|
|
46
|
0
|
|
|
|
|
|
my $query = Goo::Database::prepare_sql(<<EOSQL); |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
insert into task ( title, |
49
|
|
|
|
|
|
|
description, |
50
|
|
|
|
|
|
|
requestedby, |
51
|
|
|
|
|
|
|
importance, |
52
|
|
|
|
|
|
|
status, |
53
|
|
|
|
|
|
|
requestedon) |
54
|
|
|
|
|
|
|
values (?, ?, ?, ?, "pending", now()) |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
EOSQL |
57
|
|
|
|
|
|
|
|
58
|
0
|
|
|
|
|
|
Goo::Database::bind_param($query, 1, Goo::Prompter::ask("Enter a new task?")); |
59
|
0
|
|
|
|
|
|
Goo::Database::bind_param($query, 2, |
60
|
|
|
|
|
|
|
Goo::Prompter::ask("Enter a description (how/when/where/why)?")); |
61
|
|
|
|
|
|
|
|
62
|
0
|
|
|
|
|
|
my $requested_by = |
63
|
|
|
|
|
|
|
Goo::Prompter::pick_one("Requested by?", Goo::TeamManager::get_all_nick_names()); |
64
|
|
|
|
|
|
|
|
65
|
0
|
|
|
|
|
|
Goo::Database::bind_param($query, 3, $requested_by); |
66
|
0
|
|
|
|
|
|
Goo::Database::bind_param($query, 4, Goo::Prompter::ask("How important is this (1-10)?", 3)); |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
#my $company = Goo::Prompter::pick_one("for which company?", qw(turbo10 trexy)); |
69
|
|
|
|
|
|
|
# Goo::Database::bind_param($query, 5, ""); |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
# what is the pain associated with this task??? |
72
|
0
|
|
|
|
|
|
Goo::Database::execute($query); |
73
|
|
|
|
|
|
|
|
74
|
0
|
|
|
|
|
|
Goo::Prompter::say("New task created."); |
75
|
|
|
|
|
|
|
|
76
|
0
|
0
|
|
|
|
|
if (Goo::Prompter::confirm("Create another task?")) { |
77
|
0
|
|
|
|
|
|
$this->run($filename); |
78
|
|
|
|
|
|
|
} |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
} |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
1; |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
__END__ |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=head1 NAME |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
Goo::Thing::task::Maker - Make a task module |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=head1 SYNOPSIS |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
use Goo::Thing::task::Maker; |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=head1 DESCRIPTION |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=head1 METHODS |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
=over |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
=item run |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
make a task_maker |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
=back |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
=head1 AUTHOR |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
Nigel Hamilton <nigel@turbo10.com> |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
=head1 SEE ALSO |
116
|
|
|
|
|
|
|
|