line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#!/usr/bin/perl |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
package Goo::TeamManager; |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
############################################################################### |
6
|
|
|
|
|
|
|
# Nigel Hamilton |
7
|
|
|
|
|
|
|
# |
8
|
|
|
|
|
|
|
# Copyright Nigel Hamilton 2005 |
9
|
|
|
|
|
|
|
# All Rights Reserved |
10
|
|
|
|
|
|
|
# |
11
|
|
|
|
|
|
|
# Author: Nigel Hamilton |
12
|
|
|
|
|
|
|
# Filename: Goo::TeamManager.pm |
13
|
|
|
|
|
|
|
# Description: Model the Team: who? what? why? where? how? |
14
|
|
|
|
|
|
|
# |
15
|
|
|
|
|
|
|
# Date Change |
16
|
|
|
|
|
|
|
# ----------------------------------------------------------------------------- |
17
|
|
|
|
|
|
|
# 24/10/2005 Version 1 |
18
|
|
|
|
|
|
|
# |
19
|
|
|
|
|
|
|
############################################################################### |
20
|
|
|
|
|
|
|
|
21
|
1
|
|
|
1
|
|
3512
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
42
|
|
22
|
1
|
|
|
1
|
|
8
|
use Goo::SimpleEmailer; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
193
|
|
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
############################################################################### |
26
|
|
|
|
|
|
|
# |
27
|
|
|
|
|
|
|
# get_programmer_names - return a list of all programmers |
28
|
|
|
|
|
|
|
# |
29
|
|
|
|
|
|
|
############################################################################### |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub get_programmer_names { |
32
|
|
|
|
|
|
|
|
33
|
0
|
|
|
0
|
1
|
|
return ("Nigel Hamilton", "Dr Sven Baum", "Marcel Holan"); |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
############################################################################### |
39
|
|
|
|
|
|
|
# |
40
|
|
|
|
|
|
|
# get_programmer_emails - return a list of all programmer emails |
41
|
|
|
|
|
|
|
# |
42
|
|
|
|
|
|
|
############################################################################### |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
sub get_programmer_emails { |
45
|
|
|
|
|
|
|
|
46
|
0
|
|
|
0
|
1
|
|
return qw(nige\@thegoo.org sven\@thegoo.org mh\@thegoo.org); |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
############################################################################### |
52
|
|
|
|
|
|
|
# |
53
|
|
|
|
|
|
|
# get_all_nick_names - return a list of all staff members |
54
|
|
|
|
|
|
|
# |
55
|
|
|
|
|
|
|
############################################################################### |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
sub get_all_nick_names { |
58
|
|
|
|
|
|
|
|
59
|
0
|
|
|
0
|
1
|
|
return qw(nige mh sven); |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
} |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
############################################################################### |
65
|
|
|
|
|
|
|
# |
66
|
|
|
|
|
|
|
# send_email - send an email to all staff |
67
|
|
|
|
|
|
|
# |
68
|
|
|
|
|
|
|
############################################################################### |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
sub send_email { |
71
|
|
|
|
|
|
|
|
72
|
0
|
|
|
0
|
1
|
|
my ($from, $subject, $body) = @_; |
73
|
|
|
|
|
|
|
|
74
|
0
|
|
|
|
|
|
foreach my $staff_member (get_all_nick_names()) { |
75
|
|
|
|
|
|
|
|
76
|
0
|
|
|
|
|
|
Goo::SimpleEmailer::send_email($from, $staff_member . "\@thegoo.org", $subject, $body); |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
} |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
} |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
1; |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
__END__ |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=head1 NAME |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
Goo::TeamManager - Model the Team: who? what? why? where? how? |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=head1 SYNOPSIS |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
use Goo::TeamManager; |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=head1 DESCRIPTION |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
Model all the members of a team. |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=head1 METHODS |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
=over |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
=item get_programmer_names |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
return a list of all programmers |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
=item get_programmer_emails |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
return a list of all programmer emails |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
=item get_all_nick_names |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
return a list of nick names for all staff members |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
=item send_email |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
send an email to all staff |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
=back |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
=head1 AUTHOR |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
Nigel Hamilton <nigel@trexy.com> |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
=head1 SEE ALSO |
127
|
|
|
|
|
|
|
|