in reply to de-inventing the wheel (discussion)
In this specific case, if you have a site, I'm surprised that you don't also have a testbed server that isn't publically available. What I would do is to copy the current batch of scripts to a testbed system, install the perl tools that you need, and see which scripts fail to work. Optionally, in the case that you're talking about, if you think that access() and sub() is used throughout the CGI scripts given (and given some of the code that you have shown, I doubt that your coworkers have used these), then simply do a grep for "use CGI" and "access" or "sub", and check to see how many instances that you hit; if it's more than a dozen or so out of 200 files, then you might have some concern, but anything on the low end is easy to fix. (I'd want to go one step further, saying using a sed-like tool to simply convert all 'access' to 'Access' and 'sub' to 'Sub', but that's not the best answer if you don't know what context they are used in, eg is it sub the function or sub the keyword?).
But if you say that all the scripts simply have #!/usr/local/bin/perl instead of a specific version, and you want to have two different versions of perl installed, it's rather easy to use sed to fix this problem in all 200 scripts automagically. Simply force existing scripts to 5.005, and then have 5.6 around as well; make sure that 5.6's @INCs are separated from 5.005's @INCs as well to avoid module contaimination. Nothing existing breaks with this, and you can get 5.6 stuff out the door as well.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: de-inventing the wheel (discussion)
by deprecated (Priest) on Jun 21, 2001 at 19:20 UTC |