Perl 小程序,字节码最小发行版

发布于 2024-12-19 16:21:36 字数 245 浏览 3 评论 0原文

假设我有一个基本程序,仅使用 select() 处理文件和 TCP 套接字。没有框架,没有线程,只有接近操作系统调用的基本 I/O。它是一个单一源文件。

让我们将此视为概念证明。

我不必与黑客和逆向工程作斗争。

  • 有没有一种方法可以构建一个 .plc,其中还包括一些基本的 .pm(文件和套接字支持)?
  • 在用户的电脑上,支持此功能的最小 Perl 运行时安装是什么?

Let's say I have a basic program, working only with files and tcp sockets, using select(). No framework, no threading, just basic I/O close to operating system calls. It is a single source file.

Let's see this as a proof of concept.

I don't have to fight hackers and reverse engineering.

  • Is there a way to build one .plc, that includes also some basic .pm ( files and sockets support ) ?
  • On the users' pc, which is the minimal perl runtime install to support this ?

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

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

发布评论

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

评论(1

妄断弥空 2024-12-26 16:21:36
perl -MModule::Compile -c foo.pl
perl -MModule::Compile -c Foo.pm

...分别创建 plc 和 pmc 文件。 Perl 在 pm 文件之前自动检查 pmc 文件,但需要显式调用 plc 文件。这意味着最好将您的程序变成模块或 modulino。

运行时要求是 Perl 5.6 和模块 Filter::Util::Call,该模块自 5.7.3 起就位于核心中。

perl -MModule::Compile -c foo.pl
perl -MModule::Compile -c Foo.pm

… creates plc and pmc files each. Perl automatically checks for pmc files before pm files, but plc files need to be called explicitely. This means it is better to turn your program into a module or modulino.

Runtime requirements are Perl 5.6 and the module Filter::Util::Call, which is in the core since 5.7.3.

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