package ConfigURL_base;

use strict;

# This module is intended to be a simple, but hopefully
# effective way to keep all urls in a single place,
# rather than have them in every script, multiple times.

# This will also act as a baseclass for configfile objects that are 
# specific to projects.
# note that all subclasses must use the supplied method calls
# to access the object data.

# it is imperative that the actual object data is not accessed
# NB accessors that return directory paths, return them with a trailing
# slash

#### Static class globals

our $stem = "http://";
our $suffix = ".Dictyosteliumgenome.org/";

####################################################################
sub new{
####################################################################
# This simple constructor initializes a few variables, and returns a 
# blessed hash, which can then be used to call the various methods

    my $self = {};

    bless $self, shift;

    $self->_init;

    return $self;

}

####################################################################
sub _init{
####################################################################
# This simple initialization function simply sets up some paths

    my $self = shift;

    $self->{'_wine'}   = $stem."db".$suffix;
    $self->{'_Dictyostelium'}  = $stem."seq".$suffix;
    $self->{'_bread'}   = $stem."www".$suffix;

}

####################################################################
####################################################################
#
#
#         ACCESSOR METHODS
#
#
####################################################################

####################################################################
sub wineServerRoot      { $_[0]->{'_wine'}   }
####################################################################
sub DictyosteliumServerRoot     { $_[0]->{'_Dictyostelium'}  }
####################################################################
sub breadServerRoot      { $_[0]->{'_bread'}   }
####################################################################

1; # to keep stupid perl happy :-)
