How to upgrade to Perl 5.6.1 from cpan.org?
Hello SuSE folkz, I've noticed that SuSE installs perl in /usr/lib/perl5 directory. However CPAN default directory for a newer 5.6.1 perl is /usr/local Could somebody tell me please what is the best way to upgrade Perl on SuSE7.2 without screwing the whole default perl structure and dependencies. Thank you in advance. Alex -- MS Windows users should be covered under the Americans with Disabilities Act! --------------> Try Linux and you'll understand why <--------------
I've noticed that SuSE installs perl in /usr/lib/perl5 directory. However CPAN default directory for a newer 5.6.1 perl is /usr/local Could somebody tell me please what is the best way to upgrade Perl on SuSE7.2 without screwing the whole default perl structure and dependencies.
Well, I still use SuSE-7.1, but what I did was build Perl-5.6.1 in /opt as a regular optional package, then make sure the path to that Perl was higher in my path than the normal one. I then use the 'env' tool to run my Perl scripts. You could also create a link in /usr/local or /usr/bin if you want your existing scripts to use the new binaries - I didn't do that. This gives the best of both worlds - you have and use the new version by default, but can fall back to the old version by using a fully qualified name should you need to.
I've noticed that SuSE installs perl in /usr/lib/perl5 directory. However CPAN default directory for a newer 5.6.1 perl is /usr/local Could somebody tell me please what is the best way to upgrade Perl on SuSE7.2 without screwing the whole default perl structure and dependencies.
Well, I still use SuSE-7.1, but what I did was build Perl-5.6.1 in /opt as a regular optional package, then make sure the path to that Perl was higher in my path than the normal one. I then use the 'env' tool to run my Perl scripts. You could also create a link in /usr/local or /usr/bin if you want your existing scripts to use the new binaries - I didn't do that.
This gives the best of both worlds - you have and use the new version by default, but can fall back to the old version by using a fully qualified name should you need to.
-- Thank you for the useful tip. I was interested to read your comment about using "env" to run your Perl scripts. I have recently started having problems with running my perl progs with errors like "No such file or directory" even when using the fully qualified path to the
Derek, On Tue, 21 Aug 2001, Derek Fountain wrote: program. The program runs fine with "perl filename". I suspect your "env" trick is the answer - more details please. TIA, Mark Perl - Beginner
Thank you for the useful tip. I was interested to read your comment about using "env" to run your Perl scripts. I have recently started having problems with running my perl progs with errors like "No such file or directory" even when using the fully qualified path to the program. The program runs fine with "perl filename". I suspect your "env" trick is the answer - more details please.
Replace your she-bang line: #!/usr/bin/perl with #!/usr/bin/env perl It's detailed in the "perlrun" perldoc page. I have scripts which I want to run unaltered on Linux and AIX (where the Perl binaries live in totally weird places). This is how I do it. The only disadvantage is that this doesn't work: #!/usr/bin/env perl -w The -w switch makes env barf. If you want warnings (which, of course, you do) you have to use this: #!/usr/bin/env perl use diagnostics; disable diagnostics; which has a similar affect. In Perl 5.6 and onwards you can just say "use warnings" which does exactly what -w does, but will only work if you know the Perl version is 5.6 or later.
participants (3)
-
Alex Daniloff
-
Derek Fountain
-
MRC Daglish