Skip to Content
Raku学习手册
book

Raku学习手册

by brian d foy
October 2020
Beginner to intermediate
499 pages
9h 13m
Chinese
China Electric Power Press Ltd.
Content preview from Raku学习手册
204
10
使用模块
模块(
Module
)允许你分解、发布和重用代码。有些人可能已经创建了一些问题的
通用解决方案,将其打包,以便你在你的程序中重用这些模块。有时人们允许所有
人使用这些模块。可以在
https://modules.perl6.org
找到一些
Perl 6
模块,或者也可以
GitHub
上查找。
要想使用模块的特性,并不需要你理解模块内部的代码。通常可以依照文档中的例
子写代码,即使其中使用了你还没有见过的语法。
10.1
安装模块
zef
Perl 6
的一个模块管理器。它可以安装、更新和卸载模块。这个模块管理器是
Rakudo Star
自带的,不过你也可以自行安装:
% git clone https://github.com/ugexe/zef.git
% cd zef
% perl6 -Ilib bin/zef install .
一旦有了
zef
,就可以安装模块了。
Task::Popular
模块会安装其他模块最常用的那
些模块:
% zef install Task::Popular
如果模块的作者已经在模块生态系统注册了他的模块,也可以按名来安装这个模块:
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

可编程网络自动化

可编程网络自动化

Jason Edelman, Scott S. Lowe, Matt Oswalt
程序员学数据结构

程序员学数据结构

Posts & Telecom Press, William Smith
R深度学习权威指南

R深度学习权威指南

Posts & Telecom Press, Joshua F. Wiley
AI工程

AI工程

Chip Huyen

Publisher Resources

ISBN: 9787519848002