Yes, ugly indeed - have the CGI read another file which contains the configuration instead. I usually require a config.cgi located in the same directory as the script and looks something like
#!perl -w
use constant (OPTION1 => 'value1');
use constant (OPTION2 => 'value2');
use constant (OPTION3 => 'value3');
1;
Note that care should be taken with the server configuration in that case, and the file should be executable. On a properly configured server, calling this file on the URL will then result in a 500 server error.
Makeshifts last the longest. |