Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: perl install prefix as an env variable

by jeffenstein (Hermit)
on Mar 13, 2002 at 18:07 UTC ( [id://151466]=note: print w/replies, xml ) Need Help??


in reply to perl install prefix as an env variable

I use this little bit at the start of my scripts, as I run them on my local box with $HOME/tools/perl, and on the HP servers as /opt/perl5/bin/perl.

#!/bin/sh PATH=$HOME/perl/bin:$HOME/tools:/opt/perl5/bin:/usr/local/bin:$PATH export PATH exec perl -S -w -x $0 ${1+"$@"} #! perl -w #line 8

I got this one straight from perlrun. The same should work for you, but just change the $PATH to include the preferred perl version first.

Replies are listed 'Best First'.
Re: Re: perl install prefix as an env variable
by Anonymous Monk on Mar 13, 2002 at 20:07 UTC
    That is what I have been more or less doing, I'm just wondering if there is a way to do that when running the ./Configure file. ie some way to --prefix=$VARIABLE and have the variable stay through the build and not be substituted (and be an env variable)

      D'oh... Gotta start reading before replying.

      Can you use ./Configure -d -Dprefix=~/perl -Uinstallusrbinperl ??

      Or perhaps ./Configure -d -Dprefix="$ENV_VAR" -Uinstallusrbinperl

      Warning: not tested

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (8)
As of 2024-04-23 13:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found