LoginSignup
2
2

More than 5 years have passed since last update.

インターネットから隔離された状況でCPANモジュールを使う

Posted at

別にCPANのモジュールに限った話ではないけど、
世の中にはインターネットから隔離された世界が存在しており、
そういった環境ではcpanコマンドでホイホイモジュールを入れられない。

という訳でそんなときにローカルで.pmファイル読み込むときのメモ

以下、Test::Simpleモジュールを入れるときの手順

CPAN本家からモジュールを入手し、何とか配置する
# ls /usr/local/lib/perl
Test
# ls Test
Builder  Builder.pm  Harness.pm  More.pm  Simple.pm  Tutorial.pod
useで参照するライブラリのパスを追加
use lib '/usr/local/lib/perl';
use Test::Simple tests => 1;

ok( $foo eq $bar, 'foo is bar' );

モジュールの意存関係が発生したときは自分で解決しないといけないので面倒だけど。。

2
2
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2