有时我看到人们使用
http://codepad.org作为快速运行/测试他们的Perl片段的方式(它支持使用各种语言,从C到Scheme到Perl).
很明显,对于使用键盘测试哪些代码/功能必须有一些限制 – 有谁知道这些限制是针对Perl运行者的?
我会根据自己的观察得出结论:不是每个CPAN模块都可用:(
解决方法
主要基于他们的“关于”页面:
> codepad仅支持Perl 5.8.0
>据推测,与任何Perl安装一样,并非每个模块(CPAN或其他模块)都存在.
>作为一个具体的例子,缺少List::MoreUtils.
>作为一个子限制,它们似乎在Linux上运行.所以任何Windows特定的模块肯定会出来.
>这是一个chroot监狱,系统调用限制.除此之外,这似乎阻止了文件创建(我的片段在当前目录中创建文件或/ tmp都出错,以及File :: Temp调用)
>键盘代码在虚拟机上执行.在防火墙后面.并埋在沙坑里.因此某些功能可能已禁用 – 尤其是网络/互联网功能.确切的“约”引用是:
The supervisor processes run on virtual machines,which are firewalled such that they are incapable of making outgoing connections.
The machines that run the virtual machines are also heavily firewalled,and restored from their source images periodically.