How "bad" replaces / usr / bin / perl with / usr / local / bin / perl on CentOS?

ANSWERED: Basically, this can be done without any serious side effects if you compiled your own perl and you did it the same way your OS did. Although this is not a recommended practice, I could work like this for more than a month. I would conclude that it is relatively safe if you know what you are doing.

Today we came to the conclusion that we need to upgrade perl to 5.10.0 CentOS 5.x comes with perl 5.8.8.

We determined that the efforts involved in supporting the scripts with #!/usr/bin/perlproved to be futile.

According to some installation materials in CPAN and other places, it is not a “good” idea to replace the perl OS version. I have already updated the link in /usr/bin/. So my question is: how bad is a replacement /usr/bin/perl?

I have not noticed any negative consequences in our systems, but I am ready to fix the link (return to 5.8.8) as soon as the problem arises.

I am concerned that there may be some modules in the standard CentOS distribution that are not included in the CPAN 5.10.0 source. I'm still trying to figure out what could be with these modules.

Thanks in advance.

+5
source share
3 answers

, , Perl, . , , shebang, #!/Usr/bin/perl, .

, , , /usr/bin/perl Perl, . . , .

, , " ", @Mu.

,

+3

(Perl, Apache, ImageMagick,...) . , .

/usr/bin/perl , , - . OS /usr/bin/perl init, .

Perl, , Perl.

+5

Perl5 . 100% . , script, undefined Perl 5.8.8 ( , ), 5.10.0. , , script, Perl 5.8.8, 5.10.0, , .

(, - XS ..). gotchas . , , .

If you already have updated Perl in / usr / local / bin, use it. But do not disassemble or upgrade the old / usr / bin / version. This is just a small piece of hard drive (very small by today's standards).

By the way, many people appreciate perlbrew (App :: Perlbrew on CPAN) as a tool to help support multiple versions of Perl.

+4
source

All Articles