package TDS::Mode;
# $Id: Mode.pm,v 1.3 2001/01/03 08:20:42 tom Exp $
################################################################

use strict;
use vars qw($Mode);

$Mode = 'static' unless defined $Mode;

sub SetMode($)
{
    my $mode = shift;
    
    if ($mode =~ /static/i){
	$Mode = 'static';
    } elsif ($mode =~ /dynamic/i){
	$Mode = 'dynamic';
    } else {
	die "no such mode: $mode";
    }
}

sub GetMode
{
    return $Mode;
}
sub IsStatic
{
    return $Mode eq 'static';
}
sub IsDynamic
{
    return $Mode eq 'dynamic';
}
1;

