szabgab has asked for the wisdom of the Perl Monks concerning the following question:
After a relocatable perl 5.10 built using -Duserelocatableinc both the scripts that come with perl and scripts that are installed by modules have the following lines at the beginning of the file:
bin/cpan that comes with perl:
bin/padre that was installed later:#!/tmp/xl/perl-5.10.0-xl-03/bin/perl eval 'exec /tmp/xl/perl-5.10.0-xl-03/bin/perl -S $0 ${1+"$@"}' if $running_under_some_shell; #!/usr/bin/perl
Once I move the whole installation to some other place these will stop working and I'll have to write /path/to/new/location/bin/perl /path/to/new/location/bin/cpan I guess it could be fixed by running an update script after relocating the code but is there a better way that does not require making changes after moving the files?#!/tmp/xl/perl-5.10.0-xl-03/bin/perl eval 'exec /tmp/xl/perl-5.10.0-xl-03/bin/perl -S $0 ${1+"$@"}' if 0; # not running under some shell
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: scripts in relocatable perl
by ambrus (Abbot) on Jun 28, 2009 at 11:11 UTC | |
|
Re: scripts in relocatable perl
by szabgab (Priest) on Jun 28, 2009 at 12:55 UTC | |
by Corion (Patriarch) on Jun 28, 2009 at 13:02 UTC | |
|
Re: scripts in relocatable perl
by mzedeler (Pilgrim) on Jun 29, 2009 at 13:05 UTC |