1

新手,我正在尝试在 perl 环境中使用 Bioperl 模块。我的配置是

  • Windows Vista/32
  • 活动 Perl 5.10.1
  • Bioperl 1.6.1
  • Padre 和 Per Studio 2010 IDE

对于安装指南,我浏览了BioPerlWiki并使用了 PPM 方法。我安装成功。

为了检查 Bioperl 是否正常工作,我进一步遵循:

use Bio::Perl;  // Is working without error

但是当我试图做进一步的检查时

#!C:\Perl\bin
use Bio::Perl;
use strict;
$seq_object = get_sequence('swissprot',"ROA1_HUMAN");
write_sequence(">roa1.fasta",'fasta',$seq_object);

然后我收到错误

Global symbol "$seq_object" requires explicit packages name at c:\.......\example.pl line 4
Global symbol "$seq_object" requires explicit package name at c:\........\example.pl line 5
Execution of C:\...... \example.pl aborted due to compilation erros

我去了c:\perldoc Bio::Perl并知道它的用途,此外我也尝试通过谷歌追踪错误,但不知道出了什么问题。

我知道 Perl 和 bioperl 也在系统路径中。谁能指出我犯了哪些愚蠢的错误?

也会询问 bioperl 邮件列表,但我知道他们的回复不像 stackoverflow 那样快

谢谢

4

1 回答 1

2

您可以使用diagnostics pragma 来扩展 Perl 发出的诊断信息:

use diagnostics;
# your_code

这将为您提供详细的解释:

You've said "use strict" or "use strict vars", which indicates
that all variables must either be lexically scoped (using "my"),
declared beforehand using "our", or explicitly qualified to say
which package the global variable is in (using "::").
于 2011-01-15T13:14:03.020 回答