[Bioperl-l] How can I tell if I have certain BioPerl modules? Like Bio::SeqIO

Warren W. Kretzschmar wkretzsch at gmail.com
Wed Jan 19 00:49:11 UTC 2011


Hi Chet,
This is sort of a hack way to do it, but running a one-liner that
includes the library you'd like to know if you have installed will
throw an error if the library is not installed.

So this should run without error if Bio::SeqIO is installed on your system:
perl -MBio::SeqIO -e 'print "Hello World\n"'

While this will throw an error that the library called Bio::S could
not be found:
perl -MBio::S -e 'print "Hello World\n"'

A nicer way might be to print the module's version number:
perl -MBio::SeqIO -e 'print $Bio::SeqIO::VERSION."\n"'

Because of inheritance, I thin the version number might actually be
the bioperl version number.

Cheers,
Warren

On Wed, Jan 19, 2011 at 12:04 AM, Chet Seligman <cseligman at earthlink.net> wrote:
> I am running Strawberry Perl
>
> perl 5, version 12, subversion 2 (v5.12.2) built for
> MSWin32-x64-multi-thread
>
>
>
> I then installed Bioperl this way:
>
>
>
> INSTALLING BIOPERL THE EASY WAY USING CPAN
>
>
>
>   You can use the CPAN shell to install Bioperl. For example:
>
>
>
>     >perl -MCPAN -e shell
>
>
>
>   Then find the name of the Bioperl version you want:
>
>
>
>     cpan>d /bioperl/
>
>     CPAN: Storable loaded ok
>
>     Going to read /home/bosborne/.cpan/Metadata
>
>     Database was generated on Tue, 24 Feb 2004 23:55:23 GMT
>
>     Distribution    B/BI/BIRNEY/bioperl-1.2.tar.gz
>
>     Distribution    B/BI/BIRNEY/bioperl-1.4.tar.gz
>
>
>
>   Now install:
>
>
>
>     cpan>install B/BI/BIRNEY/bioperl-1.4.tar.gz
>
> And the installation went to completion
>
>
>
> Chet Seligman
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l
>




More information about the Bioperl-l mailing list