我编写了一个使用 Bio::Seq 和 Bio::SeqIO 包的小型 Perl 脚本。当我尝试在基于 linux 的服务器上运行脚本时。我收到了很多错误,基本上告诉我尚未安装 BioPerl。
我在本地安装了 ActiveState Perl 5.26,并且已经满足了安装 Bio::Perl 的大部分先决条件。只有 XML::DOM::XPath 仍然存在问题。尝试安装软件包后,我收到以下错误:
Test Summary Report
-------------------
t/test_non_ascii.t (Wstat: 512 Tests: 0 Failed: 0)
Non-zero exit status: 2
Parse errors: Bad plan. You planned 10 tests but ran 0.
Files=35, Tests=183, 4 wallclock secs ( 0.12 usr 0.04 sys + 3.46 cusr 0.52 csys = 4.14 CPU)
Result: FAIL
Failed 1/35 test programs. 0/183 subtests failed.
make: *** [test_dynamic] Error 255
MIROD/XML-DOM-XPath-0.14.tar.gz
/usr/bin/make test -- …Run Code Online (Sandbox Code Playgroud) 小结问题
我是否只为每个perl脚本使用perlapp --dependent,然后确保在构建期间将perl-static复制到应用程序的bin目录(称为perl)?
背景
我目前正在分发一个包含许多perlapp独立可执行文件的应用程序,这意味着它们每个都包含perl运行时的捆绑副本.
我想在我的应用程序中只分发perl运行时的一个副本,并让每个可执行文件引用我将分发的一个perl运行时.
例如,假设我有10个构成我的应用程序的perl脚本.当我为两个演示脚本中的每一个执行perlapp时,我看到如下所示:
+ ls -l
-rw-r--r-- 1 ----- staff 55 Feb 5 21:03 t1.pl
-rw-r--r-- 1 ----- staff 62 Feb 5 21:03 t2.pl
+ perlapp --force t1.pl
PerlApp 9.5.1 build 300018
Copyright (C) 1998-2016 ActiveState Software Inc. All rights reserved.
Commercial license for ..................................
Created 't1'
+ perlapp --force t2.pl
PerlApp 9.5.1 build 300018
Copyright (C) 1998-2016 ActiveState Software Inc. All rights reserved.
Commercial license for ..................................
Created 't2'
+ ls -l
-rwxr-xr-x 1 ----- …Run Code Online (Sandbox Code Playgroud) 在某个系统上,我正在运行一个perl脚本而且它失败了
Can't locate List/Util.pm in @INC (@INC contains: <Some-Path>/ActiveState/perl/lib <Some-Path>/ActiveState/perl/site/lib .) at <Some-Other-Path>\searchCobolPgms.ps line 7.
现在奇怪的是,在将代码部署到故障系统之前,我在笔记本电脑上运行它,它运行正常.两个系统的区别在于,在我的笔记本电脑中,我使用的是Cygwin,并且perl与它捆绑在一起,并且所述失败的系统具有ActiveState perl.
<Some-Path>perl -v
This is perl, v5.6.1 built for MSWin32-x86-multi-thread
(with 1 registered patch, see perl -V for more detail)
Copyright 1987-2001, Larry Wall
Binary build 635 provided by ActiveState Corp. http://www.ActiveState.com
Built 15:34:21 Feb 4 2003
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the …Run Code Online (Sandbox Code Playgroud) 我偶尔会在 Windows 和 Linux 上担任 Perl 开发人员。当 Perl 是合适的工具时,我每年都会编写或修改几次 Perl 脚本。偶尔使用,我从来没有成为一个真正的 Perl 专家,但我在这个论坛中得到的巨大帮助下取得了成功。
每当我构建或升级机器时,我都会获得最新的 Perl 版本。在 2020 年,我注意到 Activestate 在下载之前强制使用帐户登录。我就是这么做的,当时并没有想太多。后来我需要添加一些模块,发现PPM已被弃用并删除。
这似乎是一件大事——比如安装最新的 Ubuntu 并发现 apt-get 已被淘汰。我的理解是 Perl 用户应该回到 Activestate 并让他们构建一个捆绑所需模块的自定义安装程序,然后在每次更改时重新安装 Perl。这似乎是倒退了一步。这是朝着控制用户群并最终将免费的 Perl 变成“物美价廉的 Perl”迈出的一步吗?
Perl 社区对此有何看法,您有什么建议?我是否误解了状态工具及其工作原理?您是坚持使用 ActiveState、转向 Strawberry Perl 还是其他什么?
我试图使用TemplateToolkit而不是良好的'变量插值,我的服务器给了我很多的悲伤.以下是我得到的错误:
*** 'D:\Inetpub\gic\source\extjs_source.plx' error message at: 2008/09/30 15:27:37 failed to create context: failed to create context: failed to load Template/Stash/XS.pm: Couldn't load Template::Stash::XS 2.20:
Can't load 'D:/Perl/site/lib/auto/Template/Stash/XS/XS.dll' for module Template::Stash::XS: load_file:The specified procedure could not be found at D:/Perl/lib/DynaLoader.pm line 230. at D:/Perl/site/lib/Template/Stash/XS.pm line 31
BEGIN failed--compilation aborted at D:/Perl/site/lib/Template/Stash/XS.pm line 31. Compilation failed in require at D:/Perl/site/lib/Template/Config.pm line 82.
Run Code Online (Sandbox Code Playgroud)
平台是Windows Server 2003,我们使用ActiveState perl和PPM作为IIS包.
我正在尝试使用以下代码读取二进制文件:
open(F, "<$file") || die "Can't read $file: $!\n";
binmode(F);
$data = <F>;
close F;
open (D,">debug.txt");
binmode(D);
print D $data;
close D;
Run Code Online (Sandbox Code Playgroud)
输入文件是16M; debug.txt只有大约400k.当我查看emacs中的debug.txt时,最后两个字符是^ A ^ C(SOH和ETX字符,根据记事本++),尽管debug.txt中存在相同的模式.文件中的下一行确实有一个^ O(SI)字符,我认为这是该特定字符的第一次出现.
我如何阅读整个文件?
我有64位Vista中的ActiveState Perl的"v5.10.0为MSWin32-64的多线程构建",我试图让地穴:: SSLeay的用的版本一起安装的软件包libeay32.dll和ssleay32.dll.
我之前在使用'uwinnipeg'服务器的Win32机器上完成了这个,但是我遇到了64位系统的问题.
ppm install http://theoryx5.uwinnipeg.ca/ppms/Crypt-SSLeay.ppd ppm install failed: The PPD does not provide code to install for this platform
我尝试了直接ppm安装,似乎工作,但验证失败,我没有看到任何dll文件的迹象?
C:\Perl64\bin>ppm install Crypt::SSLeay Downloading ActiveState Package Repository packlist...done Updating ActiveState Package Repository database...done Syncing site PPM database with .packlists...done No missing packages to install C:\Perl64\bin>ppm verify Crypt::SSLeay ppm verify failed: Package 'Crypt::SSLeay' is not installed
有谁知道我在哪里/如何获得与我的PC兼容的版本?
所以我们正在迁移服务器.Arghh.一台机器上有很多Perl的东西,我们需要在另一台机器上设置.
有没有办法导出/导入已安装的所有软件包的列表,以便我可以在新服务器上安装它们而不是逐个查找?(使用Active Perl)
谢谢.
我正在运行一系列针对数据块的正则表达式.我们最近从Activestate perl 5.8 32bit(我知道......非常老!)升级到perl 5.16 64bit.所有硬件保持不变(窗口).
我们注意到性能受到影响,因为我们的解析循环需要大约2.5秒,现在大约需要5秒.任何人都可以给我一个暗示会导致变化的提示吗?我期待性能的提高,因为我的理解是引擎有了很大的改进,任何关于我应该做的事情的文档都会非常感激.
我正在尝试从目录压缩文件。除非文件名带有空格,否则它运行良好。
由于glob在空间上分割了参数,因此我也尝试了,bsd_glob但是没有用。
如何处理文件名中的空格?我正在寻找所有文件。
#Directory of focus
my $log = 'C:/Users/me/Desktop/log';
my @files = bsd_glob( $log.'/*.*' );
#Copy contents to new directory to be zipped
foreach my $file (@files) {
copy($file, $logout) or die
"Failed to copy $file: $!\n";
}
Run Code Online (Sandbox Code Playgroud)
复制失败
# Create Child tmp
my $out = 'C:/Users/me/Desktop/out';
mkdir $out;
# Directory of focus
my $log = 'C:/Users/me/Desktop/log';
opendir (DIR, $log) or die $!;
while ( my $file = readdir(DIR) ) {
next if $file =~ …Run Code Online (Sandbox Code Playgroud) activestate ×10
perl ×9
64-bit ×1
binaryfiles ×1
bioperl ×1
cygwin ×1
iis ×1
linux ×1
list ×1
openssl ×1
performance ×1
perl-module ×1
perlapp ×1
regex ×1
windows ×1
xml ×1
xpath ×1