Linux 我通过cpan安装了一个perl模块。但是我如何使用它呢?
经过大量的问题,我设法让Linux 我通过cpan安装了一个perl模块。但是我如何使用它呢?,linux,perl,cygwin,cpan,log4perl,Linux,Perl,Cygwin,Cpan,Log4perl,经过大量的问题,我设法让cpan在cygwin工作 我做到了:cpan[2]>I Log::Log4perl,它似乎起了作用。也就是说,它下载了一些东西: cpan[2]> i Log::Log4perl Fetching with LWP: http://cpan.localhost.net.ar/authors/01mailrc.txt.gz Going to read '/home/jsmith/.cpan/sources/authors/01mailrc.txt.gz'
cpan
在cygwin
工作我做到了:
cpan[2]>I Log::Log4perl
,它似乎起了作用。也就是说,它下载了一些东西:
cpan[2]> i Log::Log4perl
Fetching with LWP:
http://cpan.localhost.net.ar/authors/01mailrc.txt.gz
Going to read '/home/jsmith/.cpan/sources/authors/01mailrc.txt.gz'
............................................................................DONE
Fetching with LWP:
http://cpan.localhost.net.ar/modules/02packages.details.txt.gz
Going to read '/home/jsmith/.cpan/sources/modules/02packages.details.txt.gz'
Database was generated on Mon, 13 May 2013 17:53:03 GMT
..............
New CPAN.pm version (v2.00) available.
[Currently running version is v1.960001]
You might want to try
install CPAN
reload cpan
to both upgrade CPAN.pm and run the new version without leaving
the current session.
..............................................................DONE
Fetching with LWP:
http://cpan.localhost.net.ar/modules/03modlist.data.gz
Going to read '/home/jsmith/.cpan/sources/modules/03modlist.data.gz'
............................................................................DONE
Going to write /home/akis/.cpan/Metadata
Module id = Log::Log4perl
DESCRIPTION Log4j implementation in Perl
CPAN_USERID MSCHILLI (Michael Schilli <m@perlmeister.com>)
CPAN_VERSION 1.41
CPAN_FILE M/MS/MSCHILLI/Log-Log4perl-1.41.tar.gz
DSLIP_STATUS ampOp (alpha,mailing-list,perl,object-oriented,Standard-Perl)
INST_FILE (not installed)
当我尝试运行它时,我得到:
在@INC中找不到Log/Log4perl.pm
我在
~/.cpan
下搜索了Log4perl.pm
但找不到它。为什么?没有安装cpan吗?是否需要执行其他操作?cpan I
提供有关软件包的信息
使用cpan安装…
安装软件包
(或键入“帮助以获取帮助…”
cpan i
提供有关程序包的信息
使用cpan安装…
安装软件包
(或键入帮助以获取帮助…)
#!/usr/bin/perl
use strict;
use warnings;
use Log::Log4perl qw(:easy);