Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

(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

Replies are listed 'Best First'.
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.


      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?

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (2)
As of 2022-01-22 00:44 GMT
Find Nodes?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:

    Results (60 votes). Check out past polls.