[Bioperl-l] Global version number for all bioperl modules

Aaron J Mackey ajm6q at virginia.edu
Wed Jun 4 13:25:01 EDT 2003

On 4 Jun 2003, Heikki Lehvaslaiho wrote:

> 4. maintenance/modules.pl has a new option --version which should
>    test all core modules for version number but the code sometimes
>    returns the correct number and sometimes, not even when it can
>    be accessed from command line.  Could someone help please!

This is a known limitation with how Bio::Root::Version works; it depends
on the import() routine getting called.  At the command line, when you
load Bio::Root::HTTPget, it loads Bio::Root::Root, which loads
Bio::Root:Version and everything works.  But in your modules.pl script,
Bio::Root::Root has already been loaded previously, so
Bio::Root::Version's import() script doesn't get called, so HTTPget's
VERSION doesn't get set.

The robust solution is to force all modules to "use Bio::Root::Version"
directly (adding that to Bio::Root::Xref, for instance, solves your
modules.pl problem).

Another solution is to provide Bio::Root::Root with its own
custom import() method that chains along to Bio::Root::Verson; however,
this is just passing the buck - two modules that use a common base module
that itself uses Bio::Root::Root will not both get versioned, only one
(because the second time the common base was use'd, Root's import wouldn't
get called).


 Aaron J Mackey
 Pearson Laboratory
 University of Virginia
 (434) 924-2821
 amackey at virginia.edu

More information about the Bioperl-l mailing list