ホームディレクトリのある作業ディレクトリ内でのみ古いバージョンのperlを利用したいのですが、その設定方法はどうすればよいのでしょうか?
ネット上にあるものだとPerl用のバージョン管理ツール(perlbrew)を利用したりする情報がありますが、手動で設定する方法が知りたいです。
環境
OS: ubuntu18.04
perlはもともと入っているバージョン
plain
1~$ perl -v 2This is perl 5, version 26, subversion 1 (v5.26.1) built for x86_64-linux-gnu-thread-multi 3(with 67 registered patches, see perl -V for more detail) 4 5Copyright 1987-2017, Larry Wall 6 7Perl may be copied only under the terms of either the Artistic License or the 8GNU General Public License, which may be found in the Perl 5 source kit. 9 10Complete documentation for Perl, including FAQ lists, should be found on 11this system using "man perl" or "perldoc perl". If you have access to the 12Internet, point your browser at http://www.perl.org/, the Perl Home Page.
~/tmpにwgetで旧verのperlをダウンロード
~/tmp/perl-5.24.4
やりたいこと
~/workディレクトリより上層ではデフォルトのバージョン(v5.26.1)、
~/work以内の下層ディレクトリにおいては旧バージョンv5.24.4
を利用したいです。
例)
【~/workと同層or上層】
~/hoge → v5.26.1
/fuga → v5.26.1
【~/work or それより下層】
~/work → v5.24.4
~/work/piyo → v5.24.4
インストール先
~/work/perl/5_24_4/bin/perl, perl5.24.4 ← ここに実行ファイルがある
回答3件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。