问题标签 [strawberry-perl]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
perl - 如何从模块内部访问主命名空间中的哈希
我有我的主要 Perl 脚本,其中包含
如何$System->{'Path'}->{'root'}
从外部模块访问变量?
我知道我可以使用main::
命名空间来检索全局变量,例如$main::x
,但以下不起作用$main::System->{'Path'}->{'root'}
。
我也尝试了不同的语法,但我无法得到它。
我究竟做错了什么?
c# - 嵌入式脚本语言作为(草莓)Perl 和 C# 的定制点
我正在研究在客户端/服务器应用程序中创建自定义逻辑的选项。我设想客户将用脚本语言编写逻辑,存储在配置文件中。
客户端是用 C# (NET 3.5) 编写的,服务器端是 Perl(Windows 上的草莓 Perl)。我希望脚本可以在两个平台上的两侧执行。
问题是 - 我还不能选择一种可以嵌入到两者中的脚本语言/引擎。
在 C# 中嵌入 X 是一个简单的部分——看起来到处都有选项/库。Strawberry Perl 部分很难。我在看 Lua 和 Javascript。从 Perl 调用 Lua 似乎没有一个好的模块,更不用说我还没有开始研究如何编译。我也在看 JavaScript::V8,虽然我可以在 Windows 中编译 V8,但是 JavaScript::V8 模块拒绝编译。
我对任何脚本语言(Lua、JavaScript、Python、Ruby、Perl ......无论如何)都持开放态度,我敢打赌这里有人可能已经完成了这个并且可以给出一些提示?
我目前的后备计划是使用 Javascript [Module JE(纯 Perl Javascript 引擎),C# 上的 V8],但我对它的性能(Perl 部分)持保守态度。我希望有一些更好的选择。
windows - 为什么不鼓励在 Windows 上将 PPM perl 模块与 Strawberry perl 一起使用?
谁能解释为什么人们会发表这样的评论?我在 stackoverflow 上看到了几个线程(比如这个),人们这么说。在我看来,PPM 只不过是刚刚被放入你的 perl 安装中的模块的预编译版本。假设它们对系统 DLL 没有外部依赖关系,那么最大的风险是什么?
据我所知,PPM 在安装特定模块时会进行依赖性检查,并将安装它需要的任何其他模块。看起来就像在 Linux 发行版上使用 .deb 或 .rpm 文件一样。
编辑#1:
我找到了这个关于模块 Wx 的页面,他们在其中展示了如何使用 PPM 为 Strawberry Perl 安装 Wx。我试过了,它们似乎工作得很好。我还使用 PPM 和 cpanminus 混合了 CPAN 模块,一切似乎都很好。模块如:
- Wx
- 约会时间
- DBI
- 数据::自卸车
- DBD::AnyData
我的结论是,关于将 PPM 与 Strawberry Perl 混合的风险的评论应该与一粒盐一起服用,因为这可能会在这里或那里引起您的问题,但总的来说使用 PPM 模块非常好与草莓 Perl。
perl - activestate 卸载 cygssp-o.dll 后的 perl 错误
卸载 ActiveState 后,我在尝试从命令提示符执行“perl”时遇到了这个奇怪的错误。
程序无法启动,因为您的计算机缺少 cygssp-o.dll。尝试重新安装程序以解决此问题。
卸载 ActiveState 后,我尝试安装 Strawberry Perl,我什至清理了我的 SYSTEM 路径以仅包含 Strawberry Perl。
但是,当我尝试执行以下命令时,仍然会出现此消息
perl
修复它的唯一方法是重新安装 ActiveState。
知道有什么问题吗?我试图搜索该错误,但它似乎不是很受欢迎。
perl - 这个错误是什么意思 - 使用 cpan 安装 perl 模块
我尝试在 Windows 7 上安装HTML::TreeBuilderX::ASP_NET 。我有cpan
草莓 perl 设置。
一切都很顺利,直到我得到以下结果。这是我应该担心的事情吗?
然后在安装 WWW::Mechanize 时我得到了
perl - WWW::Mechanize 和草莓 perl
当我尝试使用草莓 perl(v5.10.1)从 CPAN 安装 WWW::Mechanize 分发时
windows 7 我得到以下故障?
有人可以帮助这里可能是什么问题以及如果可能的话如何解决它?
perl - 草莓 perl:没有 File::Tail.pm。CPAN 安装模块失败
我正在使用草莓 perl 使用 use 来跟踪文件File::Tail
。
我收到以下错误消息:
在 @INC 中找不到 File/Tail.pm(@INC 包含:c:\strawberry\perl\lib C:/strawberry/perl/site/lib C:/strawberry/perl/vendor/lib C:/strawberry/ perl/ lib .) 在 tailing.perl 第 5 行。BEGIN failed - 编译在 tailing.perl 第 5 行中止。
三个包包含 lib:
c:\strawberry\perl\lib
C:\strawberry\perl\site\lib
C:\strawberry\perl\vendor\lib
c:\strawberry\perl
perl安装的根目录在哪里。
我检查了所有三个包,但找不到File/Tail.pm
.
使用cpan install,但安装失败。
visual-c++ - VC++ 链接器问题
我在一个项目中使用草莓 perl 和 GDI+。一切都得到正确编译,我能够在调试模式下运行 perl 脚本。但是当我构建我的项目的发布版本然后运行它时,它会出现以下错误
和应用程序退出说好的。我无法理解为什么系统在 gdiplus.lib 中定义的 perl512.dll 中搜索 API GdipGetImageThumbnail。
windows - "Out of memory" with simple Win32::Unicode::File readline loop and Strawberry Perl
The issue I have can be found by running the following code in Strawberry perl 5.12.3.0 on Windows XP.
The only thing that is happening here is that I perform a readline and this keeps eating memory until I get an Out of memory error from Strawberry perl. I am using a really big file but since this code is stream based it shouldn't matter. Am I missing something here or is there a leak somewhere in Strawberry perl? I tested the exactly same code in ActivePerl and there it works fine, i.e., it doesn't eat memory.
Update: Replacing Win32::Unicode::File with the normal diamond operator seems to work on my distribution at least. See the following code.
So that would suggest the problem lies with Win32::Unicode module right?
perl - 如何在不使用 Win32::Unicode::File 的 Strawberry perl 中使用 unicode 读取具有长文件名的文件?
我有一个文件位于 Windows XP 机器上的一个目录中,其中包含丹麦字符。我使用 Strawberry perl 并想阅读这个文件。以下代码工作正常:
getOpenFile 例程来自 Tk。现在由于某种原因 Win32::Unicode::File 有一些我无法忍受的不幸副作用(它吃掉了我的记忆,请参阅简单的 Win32::Unicode::File readline 循环和 Strawberry Perl 的“内存不足”)。现在,如果我尝试在没有 Win32::Unicode::File 接口的情况下打开文件,我会发现找不到文件。原因是路径被错误地解释了。我尝试根据Perl 转换路径:在 Windows 上管理路径编码由于某种原因不起作用。我应该如何解决这个问题?我尝试了以下方法:
它不起作用。有任何想法吗?
如果我不清楚,请原谅我。
亲切的问候,迈克尔