ねもぷらす

ふぁいんでぃんぐねもの日記。プログラミングとか育児とか

MacPorts で perl のバージョンを上げる

perl は古いままなのに ruby だけ最新バージョンなんて滑稽だわ。
ここはお墓よ、JavaJavaアプレットの。


ということで Perl のバージョンも上げておく。


http://www.perl.org/
現在の最新バージョンは 5.16.2 の様子。

perl -v

$ perl -v

This is perl 5, version 12, subversion 4 (v5.12.4) built for darwin-thread-multi-2level

Copyright 1987-2010, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl".  If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.

port installed | grep perl

$ port installed | grep perl
  p5.12-libwww-perl @6.40.0_1+ssl (active)
  perl5.12 @5.12.4_1 (active)
  postgresql92 @9.2.2_0+perl+python+python27+universal (active)
  subversion-perlbindings-5.12 @1.7.7_0 (active)

sudo port install perl5.16

バージョン違いなので upgrade ではなく install。

--->  Computing dependencies for perl5.16
--->  Fetching archive for perl5.16
--->  Attempting to fetch perl5.16-5.16.1_1.darwin_10.x86_64.tbz2 from http://packages.macports.org/perl5.16
--->  Attempting to fetch perl5.16-5.16.1_1.darwin_10.x86_64.tbz2.rmd160 from http://packages.macports.org/perl5.16
--->  Installing perl5.16 @5.16.1_1
--->  Activating perl5.16 @5.16.1_1
--->  Cleaning perl5.16
--->  Updating database of binaries: 100.0%
--->  Scanning binaries for linking errors: 100.0%
--->  No broken files found.

シンボリックリンクを張り替える必要アリ

$ ls -l /opt/local/bin/perl*
lrwxr-xr-x  1 root  admin     23  1 14 06:39 /opt/local/bin/perl -> /opt/local/bin/perl5.12
-rwxr-xr-x  1 root  admin   9896  6 26  2012 /opt/local/bin/perl5.12
lrwxr-xr-x  1 root  admin      8  6 26  2012 /opt/local/bin/perl5.12.4 -> perl5.12
-rwxr-xr-x  1 root  admin  10000  8 24 03:41 /opt/local/bin/perl5.16
lrwxr-xr-x  1 root  admin      8  8 24 03:42 /opt/local/bin/perl5.16.1 -> perl5.16
-rwxr-xr-x  2 root  admin  45815  6 26  2012 /opt/local/bin/perlbug-5.12
-rwxr-xr-x  2 root  admin  41712  8 24 03:41 /opt/local/bin/perlbug-5.16
-rwxr-xr-x  1 root  admin    244  6 26  2012 /opt/local/bin/perldoc-5.12
-rwxr-xr-x  1 root  admin    244  8 24 03:41 /opt/local/bin/perldoc-5.16
-rwxr-xr-x  1 root  admin  12484  6 26  2012 /opt/local/bin/perlivp-5.12
-rwxr-xr-x  1 root  admin  10802  8 24 03:41 /opt/local/bin/perlivp-5.16
-rwxr-xr-x  2 root  admin  45815  6 26  2012 /opt/local/bin/perlthanks-5.12
-rwxr-xr-x  2 root  admin  41712  8 24 03:41 /opt/local/bin/perlthanks-5.16

$ sudo rm /opt/local/bin/perl; sudo ln -s /opt/local/bin/perl5.16 /opt/local/bin/perl

$ perl -v

This is perl 5, version 16, subversion 1 (v5.16.1) built for darwin-thread-multi-2level

Copyright 1987-2012, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl".  If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.