“现代”入门资源珀尔

发布于 2024-08-12 03:12:06 字数 360 浏览 6 评论 0原文

在听说 Perl 生态系统的新部分(例如 Moose、DeclareX 和 Catalyst)后,我认为了解一下 Perl 会很好。不幸的是,我能找到的所有介绍性材料都针对 Perl 5.8 或 5.6,并且对这些较新的框架一无所知,更不用说最近 Perl 版本中引入的功能了,例如 ~~ 运算符。对于有兴趣接触 Perl 并希望从一开始就学习当前最佳实践方法的人来说,可以使用哪些资源?

虽然我可以阅读《camel》书的第三版,然后通过成堆的 CPAN 文档等来完成剩下的工作,但我非常感谢一个教程,它不会强迫我学习一堆已弃用的方法。当我阅读参考手册时,只是为了转身并再次忘记它们。真实世界的代码如果有详细的文档记录并使用了 Perl 的一些新功能,那就太好了。

After having heard about new parts of the Perl ecosystem, such as Moose, DeclareX, and Catalyst, I thought that it'd be nice to take a look at Perl. Unfortunately, all of the introductory material I can find targets Perl 5.8 or 5.6, and knows nothing about these newer frameworks—let alone features introduced in recent Perl versions, such as the ~~ operator. What resources are available for someone interested in coming to Perl fresh, and wanting to learn the current best-practice way to do things right from the get-go?

While I can read the 3rd edition of the camel book, then work the rest of my way through piles of CPAN documentation and the like, I'd tremendously appreciate a tutorial that doesn't force me to learn a bunch of deprecated ways to do things, just to turn around and unlearn them again when I read a reference manual. Real-world code that's well-documented and uses some of these newer corners of Perl would also be wonderful.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

萌面超妹 2024-08-19 03:12:06

chromatic 正在编写一本 Modern Perl 书籍,可以在他的 Github 帐户中预览。 Kieren Diment 和 Matt Trout 最近出版的 Catalyst 书涵盖了几种现代 Perl 实践和当前的 Perl 实践。我相信马特称之为“开明的堆栈”。

一本《驼鹿》的书也在制作中,但我怀疑它能否在明年夏天之前上市,即使作者能够全职专注于它。对于学习最佳实践,只要您对 Damian 的 Perl 最佳实践值得一读。我不建议他的做法是最好的,但它们阐明了对话点在哪里,你可以在谷歌上搜索人们对此的评论。我个人遇到的最大问题是它的面向对象建议,它引导我找到了我喜欢的 Moose。

最后,与社区互动。加入一三个邮件列表、一两个 IRC 频道,并定期在博客上介绍您所学到的知识。 Perl 社区普遍支持帮助那些真正有兴趣学习的人找到他们需要的工具。

chromatic is in the process of writing a Modern Perl book which is available for preview in his Github account. The recent Catalyst book by Kieren Diment and Matt Trout covers several modern perl practices and the current "Enlightened Stack" as Matt I believe calls it.

There is also work going on for a Moose book, but I doubt it will be available before next summer even if the authors were able to focus on it full time. For learning Best Practices, as long as you take it with a huge grain of salt the discussion in Damian's Perl Best Practices is worth reading. I wouldn't recommend his practices are best, but they illuminate where the conversation points are and you can google around for people's comments on it. The biggest problem I personally had was the OO suggestions it had, and it led me to find Moose which I adore.

Finally, interact with the community. Join a mailing list or three, an irc channel or two, and blog regularly about what you're learning. The Perl community is generally supportive of helping people who really are interested in learning find the tools they need.

旧人 2024-08-19 03:12:06

学习 Perl,第 5 版当前版本为 5.10。除了初学者想要的其他新功能之外,甚至还有一章介绍智能匹配运算符,就像您想要的那样。如果您想开始学习 Perl,那么这本书就是您所需要的。一旦你完成了它,就可以继续做你想做的其他事情。我也会在春季开始时发布Effective Perl 编程,第二版 。这将是最新的 5.10.1(并且可能会更远一些,因为我们在某些代码中至少使用了一个 5.12 功能)。

你真的不需要一本关于 Catalyst 或 Moose 的书。你读到的任何东西都将过时,因为这些项目的速度很快,实践变化也很快。无论如何,在深入研究高级主题之前,您需要学习基础知识。

要继续成为一名程序员,你必须习惯不依赖书本。我无法像内容更改一样快地编写它们,因此您也必须从文档中学习。生活就是这样。

Learning Perl, 5th Edition is current up to 5.10. There's even a chapter for the smart match operator, just like you want, in addition to the other new features that a beginner will want. If you want to start learning Perl, that's the book to use. Once you get through it, move onto whatever else you want to do. I'll have Effective Perl Programming, 2nd Edition out around the start of spring too. That will be current up to 5.10.1 (and maybe a little farther since we use at least one 5.12 feature in some code).

You really don't want a book on Catalyst or Moose. Anything you read will be out of date because those projects have a high velocity and the practices change pretty quickly. You're going to need to learn the basics before you dive into the advanced topics, anyway.

To continue as a programmer, you're going to have to get used to not depending on books. I can't write them as fast as stuff changes, so you have to learn from the documentation too. That's just how life is.

dawn曙光 2024-08-19 03:12:06

Paul Fenwick 在 OSCON 上发表了一场精彩的演讲,主题为“Awesome Things You've Missed” in Perl”,其中他给出了一些使用 Modern Perl 的代码示例和使用技巧。

演讲已录制,但尚未出现在录音列表中:
http://www.oscon.com/oscon2010/public/schedule/proceedings

以下是其他一些值得一看的精彩演讲,其中也提供了现代 Perl 的示例:

最后(不是来自 OSCON):

Larry Wall 在 Google 发表演讲

There was an excellent talk at OSCON by Paul Fenwick on "Awesome Things You've Missed in Perl" where he gives several code examples and usage tips for using Modern Perl.

The talk was recorded, but it's not on the list of recordings yet:
http://www.oscon.com/oscon2010/public/schedule/proceedings

Here are some other great talks worth checking out that also provide examples of Modern Perl:

And finally (not from OSCON):

Larry Wall speaking at Google

没有伤那来痛 2024-08-19 03:12:06

即使这个答案很晚,一本关于 Modern Perl 的新书已经在 2012 年出版了。它的名字是 Perl 入门,由 Curtis 编写“奥维德”坡。它侧重于学习雇主正在寻找的 Perl 技能,适合编程初学者或想要学习新语言的实验程序员。

在介绍了语言本身之后,Ovid 继续介绍 DBIx::Class、Moose、Catalyst 以及更多 CPAN 工具和社区的最佳实践,并通过大量实际示例来演示如何在工作场所实际使用 Perl,用于网络开发、数据处理或系统管理。这本书首先在 O'Reilly 网站上免费提供,但现已被删除 (您必须付费购买印刷版或电子版)。

希望它对本 QA 的未来读者有用。

Even if this answer is very late, a new book about Modern Perl has came out on 2012. It's called Beginning Perl and is written by Curtis 'Ovid' Poe. It focuses on learning the Perl skills employers are looking for and is for both programming beginners or for experimented programmers who want to learn a new language.

After introducing the language itself, Ovid continue on DBIx::Class, Moose, Catalyst, and more CPAN tools and community's best practices with a lot of real-world examples, demonstrating how you actually use Perl in the workplace, for web development, data processing or system administration. The book was first available for free on the O'Reilly website, but has been removed now (you have to pay for a printed or electronic version).

Hope it will be useful for future readers of this QA.

摘星┃星的人 2024-08-19 03:12:06

我会推荐前面提到的 Learning Perl 5th Edition,然后是 Damian Conway 的Perl 最佳实践(之前也提到过)。

我还想向您指出PBP 模块推荐评论讨论 Perl 最佳实践中讨论的模块的当前“社区观点”。

不管本网站讨论了(或没有讨论)什么内容,我最喜欢的两个 Perl 最佳实践建议是 Data::Alias 和 Smart::Comments(尽管 Smart::Comments 是一个源过滤器,您可以在将代码发送到生产之前轻松删除它,这非常适合调试。)。

I would recommend the mentioned Learning Perl 5th Edition followed by Damian Conway's Perl Best Practices (also previously mentioned).

I would like also point you to the PBP Module Recommendation Commentary that discusses the current "community view" of the modules discussed in Perl Best Practices.

Despite what is discussed (or not) at this site, two of my favorite Perl Best Practice recommendations are Data::Alias and Smart::Comments (Even though Smart::Comments is a source filter, you can easily remove it before sending your code to production. It is great for debugging.).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文