in reply to Global includes in cgi's
Again, that code is verbatim out of the mod_perl guide, and I included a link to it above. While you could directly use this code, I highly recommend reading the entire section in the guide regarding configuration files so you can decide if this is the best method for you or not. It contains a lot of good information, and is very well written.# Configuration File Example package My::Config; use strict; use vars qw(%c); %c = ( dir => { cgi => "/home/httpd/perl", docs => "/home/httpd/docs", img => "/home/httpd/docs/images", }, url => { cgi => "/perl", docs => "/", img => "/images", }, color => { hint => "#777777", warn => "#990066", normal => "#000000", }, ); # Main CGI application example use strict; use My::Config (); print "Content-type: text/plain\r\n\r\n"; print "My url docs root: $My::Config::c{url}{docs}\n";
|
|---|