有一些关于 Perl 网络编程的最新教程吗?
是否有与 2010 年相关的关于使用 Perl 进行网络编程的链接、材料或书籍?我看到一些关于使用 Perl 进行网络编程的书籍非常古老(大约十年),互联网上的教程也很旧并且使用旧模块。
有人可以提供关于使用更新到 2010 年的 Perl 编程套接字和网络层/应用层协议的良好参考吗?
Are there links, materials, or books about network programming with Perl that are relevant to 2010? I saw some books on programming the network with Perl are very old (about a decade) and the tutorials on the internet are also old and using old modules.
Could someone provide a good reference about programming sockets and network layer/application layer protocols with Perl that are updated to 2010?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
虽然Lincoln Stein的Network Programming with Perl有点老了,但是内容还是不错的大部分都很好。在过去的几十年里,该级别的网络编程并没有发生太大变化。如果您想学习使用套接字,这本书可以帮助您入门。
然而,Perl 在套接字级别执行与 C 库相同的操作。周围可能有一些不错的界面,但是查看界面下方,您会看到相同的东西。
Although Lincoln Stein's Network Programming with Perl is a bit old, the content is still mostly good. Network programming at that level hasn't changed that much in the last couple of decades. If you want to learn to play with sockets, that's the book to get to get you started.
However, Perl at the socket level does that same thing the C libraries do. There might be some nice interfaces around it, but look under the interface and you'll see the same things.
这项任务确实需要一个异步框架:现在几乎每个人都使用 POE。我讨厌它,因为对我来说它看起来不像 Perl。它看起来像是它自己特殊的愚蠢的过早优化的语言。无论如何,您可以在cpan 有关 poe 的文档上找到更多信息。
POE 的内部结构很奇怪,POE 做了相当愚蠢的事情,比如静态索引
@_
的内容以获取“速度”。 POE 组件看起来就像代码中间的一小块巫毒粪便。或许你会喜欢,不妨尝试一下。如果您必须调试它或扩展 POE::Kernel,您可能想在其他地方寻找工作。还有一个不断增长的替代方案:AnyEvent。我会先看看。它做的事情非常不同,并且是一个更薄的层,不想感染您的整个应用程序。
链接:
This task really demands an asynchronous framework: pretty much everyone uses POE these days. I hate it because for me it doesn't look like Perl. It looks like its own special silly premature-optimized language. Anyway, you can find more info on cpan's docs about poe.
The internals of POE are weird, and POE does rather silly stuff like statically index the contents of
@_
for "speed". A POE-component looks like a little brick of voodoo-dung right in the middle of your code. You might like it, give it a shot. If you have to debug it or expand POE::Kernel you might want to look for employment elsewhere.There is a growing alternative too: AnyEvent. I'd look at it first. It does things massively different and is a much thinner layer that doesn't want to infest your whole application.
Links: