如何在 Android (SL4A) 脚本层上安装 Perl 模块?

发布于 2024-11-01 17:04:23 字数 149 浏览 5 评论 0原文

我刚刚安装了 SL4A 来在 Motorola Milestone 上测试 Perl。有没有办法安装模块?我需要 LWP::Simple。

I just installed SL4A to test Perl on my Motorola Milestone. Is there a way to install a module? I need LWP::Simple.

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

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

发布评论

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

评论(1

岁月打碎记忆 2024-11-08 17:04:23

您可以使用普通 CPAN 客户端在本地安装模块,然后使用 adb 将 perl 模块推送到 Android 设备的 SL4A site_perl。 cpanm 有 --local-lib 选项,可以轻松本地安装模块。

% adb -e push /path/to/library/HTTP /sdcard/com.googlecode.perlforandroid/extras/perl/site_perl/HTTP

请注意,这只适用于纯 perl 模块。我不确定如何构建与 SL4A 环境兼容的二进制文件。

You can install modules locally with normal CPAN clients and then push the perl modules to your Android device's SL4A site_perl with adb. cpanm has --local-lib option, which makes it easy to locally install modules.

% adb -e push /path/to/library/HTTP /sdcard/com.googlecode.perlforandroid/extras/perl/site_perl/HTTP

Note that this should only work with pure perl modules. I am not sure how you can build binary that is compatible to your SL4A environment.

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