Snow Leopard で macports を使用しています。スクリプトを実行できるように、特定の perl モジュールをインストールしたいと考えていました。正確には DateTime モジュールです。どうすればいいですか?次のコマンドを使用してみました。
perl -MCPAN -e shell
cpan > install DateTime
しかし、DateTime.pm が見つからないというメッセージが表示されます。私は何を間違えましたか?
編集: CPAN を適切に構成していないと思います。エラーが発生しました
Can't locate Module/Build.pm in @INC (@INC contains: /opt/local/lib/perl5/site_perl/5.8.9/darwin-2level /opt/local/lib/perl5/site_perl/5.8.9 /opt/local/lib/perl5/site_perl /opt/local/lib/perl5/vendor_perl/5.8.9/darwin-2level /opt/local/lib/perl5/vendor_perl/5.8.9 /opt/local/lib/perl5/vendor_perl /opt/local/lib/perl5/5.8.9/darwin-2level /opt/local/lib/perl5/5.8.9 .) at Build.PL line 5.
BEGIN failed--compilation aborted at Build.PL line 5.
Warning: No success on command[/opt/local/bin/perl Build.PL ]
Warning (usually harmless): 'YAML' not installed, will not store persistent state
DROLSKY/DateTime-0.61.tar.gz
/opt/local/bin/perl Build.PL -- NOT OK
Running Build test
Make had some problems, won't test
Running Build install
Make had some problems, won't install
Could not read '/Users/xxxxxx/.cpan/build/DateTime-0.61-ZNYzBn/META.yml'. Falling back to other methods to determine prerequisites
Warning: CPAN.pm discovered Module::Build as undeclared prerequisite.
Adding it now as such.
最初に何か他のことをする必要がありますか?