[Bioperl-l] Standaloneblast

Hilmar Lapp hlapp@gmx.net
Fri, 24 Aug 2001 10:55:08 +0200


nick holton wrote:
>
> [2] Change the line in sub _runblast to (you probably need to get File::Spec
> for this, since it is not in the standard activeperl dist.):
> 
>     #my $commandstring = Bio::Root::IO->catfile($BLASTDIR,$executable) .
> $param_string;
> 
>    my $commandstring = File::Spec->catfile($BLASTDIR,$executable) .
> $param_string;
> 

Nick, as I said if you get any chance to debug what's happening
here that would be really great. In principal
Bio::Root::IO->catfile(...) is supposed to just delegate to
File::Spec->catfile(...) if it is available on the system, so if
it is there, your change should have no effect. If it does have an
effect, the question is why.

In Bio::Root::IO.pm there is a BEGIN section, which sets (among
other things) a variable $FILESPECLOADED to TRUE if "require
File::Spec;" succeeds. The code in Bio::Root::IO->catfile(...)
says

sub catfile {
    my ($self, @args) = @_;

    return File::Spec->catfile(@args) if($FILESPECLOADED);
    # ... else we have to do it ourselves
}

So it appears that $FILESPECLOADED does not get set to TRUE on
your system even though File::Spec is installed, because for some
reason "require File::Spec;" bails out with an exception. The
question is why it works then later on.

	-hilmar

-- 
-----------------------------------------------------------------
Hilmar Lapp                              email: hilmarl@yahoo.com
A-1120 Vienna
-----------------------------------------------------------------