* at 17/04 14:00 +0200 Philip Newton said:
> Mark Fowler wrote:
> >  3) Write a set of scripts
> 
> ...with a bunch of different extensions such as .pl .plx .cgi for
> combinations of "operating system" + web server that map scripts to
> interpreters by extension and/or directory rather than by shebang line...
> 
> >                            that are all basically the same but have
> >     different #!/usr/bin/perl lines on the top and tell you the
> >     information that you might need to know about the server. 
> >     For example what version of perl you're running, what the current
> >     working directory is, what the permissions on the directories 
> >     are, etc, etc.

surely there should be a better way than this? after all the
combinations involved are quite numerous. is the notion of something
that does :

#!/bin/sh

if [ -e /usr/bin/perl ]; then
    exec './bin_perl.pl'
fi

or equivalent too silly? although not sure this sort of thing is possible
on non unix type systems. OTOH would at least cut down the number of
files that the person installing needs to worry about.

struan

Reply via email to