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:
require "config.pm";
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";
2. BEGIN {require "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.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.