Installing modules using Strawberry Perl

故事扮演 提交于 2019-11-27 17:29:42
Alexandr Ciornii

You can still use ppm, but it is not recommended. Run CPAN client from the Strawberry Perl or Strawberry Perl (64-bit), sub folder Tools, entry in the Start menu.

Type install Module::Name there.

As Alexandr says, you can use the CPAN client via the start menu. You can also install modules just as you would on Unix from the DOS window:

perl -MCPAN -e shell
install Quantum::Entanglement

You can also download the .tar.gz from CPAN, unzip it and install as you would in Unix:

cd Module-Name-1.23
perl Makefile.PL
dmake
dmake test
dmake install

You may need to make sure your %PATH% has the right entry to get to Strawberry Perl, and does not contain other copies of dmake or gcc, which will sometimes lead to headaches.

James

Change the directory:

cd C:\Strawberry\perl\bin

then

C:\Strawberry\perl\bin>cpan Lingua::EN::Sentence

and the module will install automatically.

CPAN is the easiest installation method.

As Alex has noted, you may have to download a .tar.gz and unzip it. Since he wrote his answer, Strawberry perl has deprecated dmake and you should use gmake instead.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!