Perl中的Bioperl测试错误

时间:2011-01-15 12:56:57

标签: perl bioperl

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

  • Windows Vista / 32
  • Active 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那么快

谢谢

1 个答案:

答案 0 :(得分: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 "::").