Mark Fowler <[EMAIL PROTECTED]> writes:

> > <Finding out where perl is> 
> 
> <parody>
> Stop, stop, this script archive is not ready yet!  Where are the Hello
> world examples?  Where are the detailed instructions?  And why are you
> actually working on these scripts yet!
> </parody>
> 
> You're all getting ahead of yourselves.  We need to write a set of
> helloWorld scripts that the script user can upload first to find out the
> basic facts about their server and check everything is working.
> 
> a) You have multiple copys of the script with different shebang lines on
> the top.  Only one of these will work and one of the things it'll do is
> print our is "The first line of programs you upload to this server should
> be #!/blah/perl"
> 
> b) It checks your perl version is reasonable.  Actually it probably should
> do this before a) in case there are several versions installed.
> 
> c) It tests if you've got a borken version of CGI.pm (or CGI.pm at all) by
> looking at version numbers, etc.  Same for other modules.
> 
> d) It links to an image in the same directory as itself and explains that
> if the image isn't viewable then you do not have inplace cgi and the
> things you have to know about this
> 
> e) It prints out the time, and GMT time thus highlighting to the user any
> problems they might have if this is wrong
> 
> f) It prints out a hunk of diagnostic information (e.g. perl version,
> module versions, url, etc, etc)

Ooh, 'configure.cgi'.

If only we could assume that they had a working perl on the box that
they were installing from then we could write a cunning installer
script which uploaded configure.cgi to the ISP and interrogated it via
a LWP::... client to get a bunch of configuration stuff, which could
then be used to generate a list of scripts that could run on the
user's ISP, and which could then go on and upload the scripts.

Ooh... You don't even have to assume working perl on their box. You
stick the interrogation stuff on the 'Not Matt's scripts' website. The
punter then says "I want to run these scripts on such an ISP". NMS
then checks to see if it has information about that ISP cached, and
provides the appropriate scripts if so, or a copy of configure.cgi for
the punter to upload. Once the punter has done the upload, he sets off
an interrogation phase, which works out the capabilities of the
particular user's environment and builds an appropriate script set.

Hmm... it's just a simple matter of programming...

-- 
Piers

Reply via email to