Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

(jptxs)Re: use _specific_ version

by jptxs (Curate)
on Jul 09, 2001 at 20:49 UTC ( #95045=note: print w/ replies, xml ) Need Help??


in reply to use _specific_ version

I'm assuming the two installs are in distinct directories. If so, why not just:

#!/path/to/right/perl BEGIN { @INC=/the/path/to/your/mods }

wouldn't that do the trick?

thanks arturo =)

We speak the way we breathe. --Fugazi


Comment on (jptxs)Re: use _specific_ version
Download Code
Re: (jptxs)Re: use _specific_ version
by particle (Vicar) on Jul 09, 2001 at 21:03 UTC
    HAHA! caught in your own web of assumptions! ;)

    my client has propriatary technology on Windows which allows applications to run in their own environment space, and without a hard-coded location. for example, alice could have perl 5.004 and 5.6.0 installed on the same machine, and run both versions at the same time without @INC getting confused. also, bob could run 5.6.0 from j:\, while charlie could run from c:\ or from k:\apps, and the scripts would all execute correctly.

    so, the path to perl is not the same for all users. it can be found with environment variables, but 1) that won't work on the #! line, and 2) windows doesn't really care anyway.

    on unix, yours is generally the method i use. but these scripts are Win32 based, and i believe others have provided me with the portable code i need, and will include everywhere.

    ~Particle

      I don't see anybody who has coded what you want. Several have given you code to check which version was called, but none to pull the version of Perl that you wanted.

      If this is just for testing, then I would recommend a wrapper script that explicitly calls the wanted version of Perl. Call the wrapper script and it should just work.

      (Don't forget that the wrapper may need to set environment variables, etc for your client's environment.)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://95045]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (11)
As of 2014-09-22 19:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (198 votes), past polls