[[FrontPage]]

***初期設定 [#r4081430]
 $ cpan
-cpanの初期設定をおわらす

 cpan> exit
***インストールディレクトリの設定 [#maf76e44]
 $ cpan
 cpan>  o conf makepl_arg "LIB=~/perl/lib PREFIX=~/perl  INSTALLMAN1DIR=~/perl/man/man1 INSTALLMAN3DIR=~/perl/man/man3"
    makepl_arg         LIB=~/perl/lib PREFIX=~/perl   INSTALLMAN1DIR=~/perl/man/man1 INSTALLMAN3DIR=~/perl/man/man3

 cpan> o conf commit
 commit: wrote /home/tacsw/.cpan/CPAN/MyConfig.pm

 cpan> exit
***モジュールのインストール [#g2094816]
 cpan> install Crypt::CBC
  ・
  ・
 Installing /home/tacsw/perl/lib/Crypt/CBC.pm
 Installing /home/tacsw/perl/man/man3/Crypt::CBC.3pm
  ・
  ・
 cpan> exit
***モジュールがインストールされているか確認 [#scaec230]
 $ ls /home/tacsw/perl/lib/Crypt/
 CBC.pm
***テストプログラム [#ib4f2784]
-test.pl
 #!/usr/bin/perl                                                                                                                                                                  
 use strict;
 use warnings;
 use Crypt::CBC;

***~/perl/lib/をライブラリに追加してテストプログラムを実行 [#b24cddc5]
-以下を実行してエラーが起こらなければOK(-Iで ~/perl/libを指定)
  perl -I /home/tacsw/perl/lib test.pl
***シェルの設定 [#ue26bed3]
-以下のようにシェルを設定すれば-Iオプションはいらない
 export  PERL5LIB=/home/tacsw/perl/lib/


トップ   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS