使用 Strawberry Perl 安装模块
到目前为止,我使用了 ActiveState 的 ActivePerl,并使用 ppm 来安装模块。
上周我转向 Strawberry Perl,但我不知道应该如何使用 Strawberry 安装模块珀尔。关于如何使用 Strawberry Perl 完成模块安装的一些信息是什么,或者是否有一些关于如何安装新模块的链接?
Until now I used ActiveState's ActivePerl, and used the ppm for installing modules.
Last week I moved to Strawberry Perl, but I don't know how I should install modules using Strawberry Perl. What is some information on how module installation is done using Strawberry Perl or is there some link on how to install new modules?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
您仍然可以使用
ppm
,但不建议这样做。从Strawberry Perl或Strawberry Perl(64位)运行CPAN客户端,子文件夹Tools,条目位于开始菜单。在那里输入
install Module::Name
。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.正如 Alexandr 所说,您可以通过开始菜单使用 CPAN 客户端。您还可以像在 Unix 上一样从 DOS 窗口安装模块:
您还可以从 CPAN 下载 .tar.gz,将其解压缩并像在 Unix 中一样安装:
您可能需要确保您的 %PATH% 环境变量具有访问 Strawberry Perl 的正确条目,并且不包含 dmake 的其他副本或者gcc,这有时会导致头痛。
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:
You can also download the .tar.gz from CPAN, unzip it and install as you would in Unix:
You may need to make sure your %PATH% environment variable 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.
更改目录:
然后
模块将自动安装。
Change the directory:
Then
and the module will install automatically.
CPAN 是最简单的安装方法。
正如 Alex 指出的,您可能需要下载 .tar。 gz 并解压它。自从他写下答案以来,Strawberry Perl 已弃用 dmake,你应该使用 gmake 代替。
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.