NAME

Perlbug::Config - Perlbug Configuration data handler

DESCRIPTION

Configuration data for the Perlbug bug tracking system.

Be sure to set the 'Perlbug_SiteConfig' environment variable to the correct site configuration file, and/or fix the line at the top of this module.

Set methods are provided only for current() parameters, the rest are all gettable only, and settable only from the configuration file.

SYNOPSIS

my $o_conf = Perlbug::Config->new;

my $format = $o_conf->current('format');

my $debug = $o_conf->current('debug');	

METHODS

new

Create new Config object with all prefs set.

my $conf = Perlbug::Config->new;
get_config_data

Retrieve data from site configuration file

my ($ok, $h_data) = get_config_data($config_file_location);
update_data

Update config data structure for current/local environment

my ($ok, $h_data) = &update_data(\%data);
prime_data

Prime config data structure

my ($ok, $h_data) = prime_data(\%data);
set_alarm

Sets Perlbug alarm process so we don't go on for ever :-)

UTILITIES

Certain utility methods are available against the configuration object

get_date

Returns common date for use throughout Perlbug.

my $date = get_date;     # -> 19980815 - 20010728
get_keys

Return list of Config keys of given key

my @keys = $o_conf->get_keys('current'); 	# have a look
get_vals

Return list of Config values of given key

my @vals = $o_conf->get_vals('current'); 	# have a look
get_all

Return mapping of each Config key=val

print $o_conf->get_all('current'); # -> context=ascii ...
get_config

Return textual representation of config data

print $o_conf->get_config('system');

ACCESSORS

Accessor methods are provided for the following configuration data structures:

CURRENT SYSTEM DATABASE DIRECTORY 
TARGET FORWARD FEEDBACK
EMAIL WEB
DEFAULT GROUP SEVERITY STATUS VERSION

Retrieve the value:

my $user = $o_config->system('user');

my $target = $o_config->target('generic');

Note that current is the only one available for modification, and that it returns keys of succesful updates (note the hashref).

my $attr = $self->current('format'); 			# get

my @keys = $self->current();					# get

my $data = $self->current({'format' => 'h'});	# set $data = 'format'

my @data = $self->current(						# set @data = qw(format context)
	{'format' => 'a', 'context'	=> 'html'}
); 	

AUTHOR

Richard Foley perlbug@rfi.net 1999 2000 2001

4 POD Errors

The following errors were encountered while parsing the POD:

Around line 191:

You forgot a '=back' before '=head2'

Around line 196:

'=item' outside of any '=over'

Around line 303:

You forgot a '=back' before '=head1'

Around line 413:

=back without =over