package GSDLHOME;

BEGIN {

    $ENV{'GSDLHOME'} = '**GSDLHOME**' unless defined $ENV{'GSDLHOME'};

    # just in case GSDLHOME has a slash on the end which would cause
    # double slashes below
    $ENV{'GSDLHOME'} =~ s/[\/\\]+$//;

    $ENV{'GSDLOS'} = $^O;

    if ($ENV{'GSDLOS'} =~ /(win|dos)/i) {
	$ENV{'GSDLOS'} = 'windows';
    }
    
    $ENV{'PATH'} .= ":$ENV{'GSDLHOME'}/bin/script";
    $ENV{'PATH'} .= ":$ENV{'GSDLHOME'}/bin/$ENV{'GSDLOS'}";
    unshift (@INC, "$ENV{'GSDLHOME'}/perllib");
    unshift (@INC, "$ENV{'GSDLHOME'}/perllib/cpan");
}

1;
