Re: configuring startperl during make ?



On Dec 28, 2007 12:39 AM, Mayuresh Nirhali <mayureshnirhali@xxxxxxxxx> wrote:

During DBI building, MakeMaker uses the fixin() method to write the shebang
line for all the perl scripts that will be installed.
The path on my machine is /usr/perl/5.8.4/bin/perl. I also have
/usr/perl5/bin/perl which is *currently* pointing to the same 5.8.4 perl,
but this generic version independent path helps me pointing to the latest
version all the time.

I would like to have all the shebang lines replaced to the generic
/usr/perl5/bin/perl. Now, MakeMaker's fixin method seems to be
using $Config:{startperl}. If my understanding is right, startperl is
populated during installation (correct me if I am wrong here), Is there a
way to change this parameter to point to the version independent perl path
??

The value of $Config{startperl} comes from your Config.pm file, which
in turn was built when your perl binary was built. In general, if you
want Config.pm to say something different, you should rebuild and
reinstall perl and everything that comes with it. If you've changed
some of the really important things in Config.pm, you may need to
rebuild some or all of the extra modules you've installed, too.

On the other hand, that's a lot of work considering the result. (Do
you want or need to alter the headings on scripts installed with perl
or other modules?) You'll re-install hundreds of files, but only a few
of them are only slightly changed. If you don't need to rebuild perl
for another reason, you might be able to get away with merely editing
the Config.pm file. That's not always appropriate, but in this case it
might be the right answer.

On the gripping hand, another right answer might be to hack up a
utility to munge the shebang lines. How hard could it be? Somebody is
probably making a one-liner to do that right now....

Good luck with it!

--Tom Phoenix
Stonehenge Perl Training
.



Relevant Pages

  • RE: Trying to make DBI work for me
    ... leaving something behind that conflicts with the new installation. ... Everything worked fine if we unstalled perl 5.6, ... directory, installed perl 5.8, and reloaded the DBI and DBD modules. ... Using 'ppm uninstall DBI' I uninstalled DBI. ...
    (perl.dbi.users)
  • RE: rooted NT/2K boxen?
    ... If you suspect that a compromise has occurred, ... above information are available as Perl scripts from ... executables (Perl installation not required), ... Health - your guide to health and wellness ...
    (Focus-Microsoft)
  • Re: question about installation of GD::Text on cygwin (could be a Makefile q)
    ... I just created a fresh installation of Perl 5,8.2 on my platform: ... Writing Foo/Makefile.PL ... If someone else could run the above tests on Cygwin as well, ...
    (comp.lang.perl.misc)
  • Re: pkgdb -F and a few other questions
    ... Some of the app's were dependent on Perl 5.6.1, ... > to the Perl 5.8.1 and all is well, and ran a use.perl port command. ... Yes -- replacing the main perl installation does tend to blow away ... All of the packages in question are modules you've installed directly ...
    (freebsd-questions)
  • Re: Debian Linux Perl installation (testing dist)
    ... debuian user or there might be a debian perl mailing list even. ... > This can lead to installation bugs (as I've posted in another clpm ... the package system is aware what package owns what file, ...
    (comp.lang.perl.misc)