I'm trying to do some server configuration where I use the same code on several 
different servers and the code is located in different places for each server.

I want to make sure this code is the best way to accomplish this or inquire if 
anyone knows if there is a better way.

<perl>
#!/usr/bin/perl -wT
my ($conf_dir, $file, $local_rt_dir);
my $dir_reg;
BEGIN
{
        use File::Spec::Unix;
        use Cwd;
        
        my $volume;
        
        $dir_reg                                        = qr{(?xms) \A( / ( 
/|.+ ) )\z};
        ($volume, $conf_dir, $file)     = File::Spec::Unix->splitpath( __FILE__ 
);
        ($local_rt_dir)                 = Cwd::abs_path(($conf_dir . "../../")) 
=~ m{$dir_reg};
        
        unshift(@INC, (($local_rt_dir . "/PerlModules") =~ m{$dir_reg}));
}
my ($startup_dir) = ($conf_dir . "perl_startup") =~ m{$dir_reg};
push @PerlConfig, "PerlConfigRequire            
$startup_dir/early_server_config.pl";
push @PerlConfig, "PerlPostConfigRequire        $startup_dir/perl_mods.pl";
__END__
</perl>

Basically I use this for addressing my startup.pl type files and altering my 
@LIB as early as possible.
Is this a less than desirable approach for any reason, and is there a better 
one?

Thank you,
Boysenberry Payne

Reply via email to