Goo::TeamManager - Model the Team: who? what? why? where? how?


Goo documentation Contained in the Goo distribution.

Index


Code Index:

NAME

Top

Goo::TeamManager - Model the Team: who? what? why? where? how?

SYNOPSIS

Top

use Goo::TeamManager;

DESCRIPTION

Top

Model all the members of a team.

METHODS

Top

get_programmer_names

return a list of all programmers

get_programmer_emails

return a list of all programmer emails

get_all_nick_names

return a list of nick names for all staff members

send_email

send an email to all staff

AUTHOR

Top

Nigel Hamilton <nigel@trexy.com>

SEE ALSO

Top


Goo documentation Contained in the Goo distribution.

#!/usr/bin/perl

package Goo::TeamManager;

###############################################################################
# Nigel Hamilton
#
# Copyright Nigel Hamilton 2005
# All Rights Reserved
#
# Author:       Nigel Hamilton
# Filename:     Goo::TeamManager.pm
# Description:  Model the Team: who? what? why? where? how?
#
# Date          Change
# -----------------------------------------------------------------------------
# 24/10/2005    Version 1
#
###############################################################################

use strict;
use Goo::SimpleEmailer;


###############################################################################
#
# get_programmer_names - return a list of all programmers
#
###############################################################################

sub get_programmer_names {

    return ("Nigel Hamilton", "Dr Sven Baum", "Marcel Holan");

}


###############################################################################
#
# get_programmer_emails - return a list of all programmer emails
#
###############################################################################

sub get_programmer_emails {

    return qw(nige\@thegoo.org sven\@thegoo.org mh\@thegoo.org);

}


###############################################################################
#
# get_all_nick_names - return a list of all staff members
#
###############################################################################

sub get_all_nick_names {

    return qw(nige mh sven);

}


###############################################################################
#
# send_email - send an email to all staff
#
###############################################################################

sub send_email {

    my ($from, $subject, $body) = @_;

    foreach my $staff_member (get_all_nick_names()) {

        Goo::SimpleEmailer::send_email($from, $staff_member . "\@thegoo.org", $subject, $body);

    }

}


1;


__END__