Hi, On Sun, Jun 17, 2007 at 09:16:57AM -0600, Neale Pickett wrote: > If that's the case, couldn't you do soemthing like (my perl is old and > rusty so apologies for the pseudo-perl): > > while (@ARGV) { > if (/^-([a-z])=(.*)$/) { > # do a big switch on $1, setting variables to $2 > } > } > > and avoid the use of modules altogether?
It's a little bit like reinventing the wheel, but in general it should be possible since CGI.pm doesn't modify @ARGV. So it also shouldn't interfere with blosxoms other commandline options using param(). But I haven't tested that yet. Another possibility to fix this would be the following: Instead of for $rcfile ("/etc/blosxom/blosxom.conf", "/etc/blosxom.conf", param("-f")) { write: my $conffile; $conffile = param('-f') unless $ENV{GATEWAY_INTERFACE}; for $rcfile ("/etc/blosxom/blosxom.conf", "/etc/blosxom.conf", $ENV{BLOSXOM_CONFIG_FILE}, $conffile) { So -f only gets used outside a webserver. Drawback: Only works if the server sets that environement variable. According to the specification[1] it must do that ("The following environment variables [...] are set for all requests"), but I'm not sure if really every HTTP daemon with claimed CGI support does that. [1] http://hoohoo.ncsa.uiuc.edu/cgi/env.html More CGI necessary environement variables could be added, but the more you add, the more could be set on the command line manually so that the -f feature doesn't work anymore on the command line either. Regards, Axel -- Axel Beckert - [EMAIL PROTECTED], [EMAIL PROTECTED] - http://noone.org/abe/ -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]