|There's more than one way to do things|
Sharing Configuration between Multiple CGI Scripts (was: How difficult can)by belize (Deacon)
|on Aug 08, 2002 at 14:50 UTC||Need Help??|
belize has asked for the wisdom of the Perl Monks concerning the following question:
I have a number of separate CGI's that I have decided to package together to accomplish a number of related tasks. Each CGI is a stand alone program, and each had a configuration section.
To simplify things, I decided to take all the configurations sections of each CGI and lump them together into a config.pm file, then call that file from each CGI with a "require" statement:
Simple, or so I thought. I continually get a "500 Server Error". I made sure that the config.pm had a ending "1;" line to return a true; I replaced the "require" statement with the original config lines and the CGI's work fine, but the require statement will always return a server error.
I've also tried:
1. use "config.pm";
Are there certain restrictions on using the require statement? I have searched through the site on "require use statements" but have not found any "perls of wisdom". Any ideas? P.S. permissions are all set to 755.
Edited: ~Thu Aug 8 15:49:15 2002 (GMT) by footpad: Edited title (for later searching), per Consideration.