--- BDB/BDB.pm 2008/07/09 21:16:14 1.45 +++ BDB/BDB.pm 2008/07/17 12:09:56 1.46 @@ -110,8 +110,10 @@ use base 'Exporter'; +our $VERSION; + BEGIN { - our $VERSION = '1.7'; + $VERSION = '1.7'; our @BDB_REQ = qw( db_env_open db_env_close db_env_txn_checkpoint db_env_lock_detect @@ -615,14 +617,21 @@ =cut sub VERSION { - if (@_ > 0) { - return undef if VERSION_v lt $_[0]; - if (@_ > 1) { - return undef if VERSION_v ge $_[1]; + # I was dumb enough to override the VERSION method here, so let's try + # to fix it up. + + if ($_[0] eq __PACKAGE__) { + $VERSION + } else { + if (@_ > 0) { + return undef if VERSION_v lt $_[0]; + if (@_ > 1) { + return undef if VERSION_v ge $_[1]; + } } - } - VERSION_v + VERSION_v + } } =head3 CONTROLLING THE NUMBER OF THREADS