Bio::Tools::CodonTable::is_start_codon: check in case of ambiguous codons (#266)
[bioperl-live.git] / lib / Bio / Root / Version.pm
blob0abd7026ca3350d575ae91aa430e98b0237ad036
1 package Bio::Root::Version;
3 use strict;
5 =head1 NAME
7 Bio::Root::Version - don't use, get version from each module
9 =head1 SYNOPSIS
11 package Bio::Tools::NiftyFeature;
12 require Bio::Root::RootI;
14 # later, in client code:
15 package main;
16 use Bio::Tools::NiftyFeature 3.14;
18 ## alternative usage: NiftyFeature defines own $VERSION:
19 package Bio::Tools::NiftyFeature;
20 my $VERSION = 9.8;
22 # later in client code:
23 package main;
25 # ensure we're using an up-to-date BioPerl distribution
26 use Bio::Perl 3.14;
28 # NiftyFeature has its own versioning scheme:
29 use Bio::Tools::NiftyFeature 9.8;
31 =head1 DESCRIPTION
33 This module provides a mechanism by which all other BioPerl modules
34 can share the same $VERSION, without manually synchronizing each file.
36 Bio::Root::RootI itself uses this module, so any module that directly
37 (or indirectly) uses Bio::Root::RootI will get a global $VERSION
38 variable set if it's not already.
40 =head1 AUTHOR Aaron Mackey
42 =cut
44 sub import {
45 # try to handle multiple levels of inheritance:
46 my $i = 0;
47 my $pkg = caller($i);
48 no strict 'refs';
49 while ($pkg) {
50 if ( $pkg =~ m/^Bio::/o
51 and not defined ${$pkg . "::VERSION"}
52 ) {
53 ${$pkg . "::VERSION"} = $Bio::Root::Version::VERSION;
55 $pkg = caller(++$i);
61 __END__