T
Tom Bolick
All of my perl scripts have this at the top:
-------
#!/usr/bin/perl
$IS_WEBSITE = (-e "/home/userme/lib/site_perl");
if ($IS_WEBSITE){
use lib "/home/userme/lib/site_perl";
$ENV{HTML_TEMPLATE_ROOT}='/home/userme/www/project1/online/eng';
}
else {
$ENV{HTML_TEMPLATE_ROOT}='/WWWSites/client1/project1/online/eng';
}
$ENV{HEAD_BASE}='../project1/online/eng/';
use strict;
use CGI;
use CGI::Carp qw(fatalsToBrowser set_message);
-----------
Is there a way to put this in a single setup file that all scripts call,
like setup.pl?
As you can see, I check to see if I am running on my production server,
or my development machine and change some variables and libraries
accordingly. Anyone have any better suggestions?
Tom...
-------
#!/usr/bin/perl
$IS_WEBSITE = (-e "/home/userme/lib/site_perl");
if ($IS_WEBSITE){
use lib "/home/userme/lib/site_perl";
$ENV{HTML_TEMPLATE_ROOT}='/home/userme/www/project1/online/eng';
}
else {
$ENV{HTML_TEMPLATE_ROOT}='/WWWSites/client1/project1/online/eng';
}
$ENV{HEAD_BASE}='../project1/online/eng/';
use strict;
use CGI;
use CGI::Carp qw(fatalsToBrowser set_message);
-----------
Is there a way to put this in a single setup file that all scripts call,
like setup.pl?
As you can see, I check to see if I am running on my production server,
or my development machine and change some variables and libraries
accordingly. Anyone have any better suggestions?
Tom...