… | |
… | |
111 | use base 'Exporter'; |
111 | use base 'Exporter'; |
112 | |
112 | |
113 | our $VERSION; |
113 | our $VERSION; |
114 | |
114 | |
115 | BEGIN { |
115 | BEGIN { |
116 | $VERSION = '1.7'; |
116 | $VERSION = '1.8'; |
117 | |
117 | |
118 | our @BDB_REQ = qw( |
118 | our @BDB_REQ = qw( |
119 | db_env_open db_env_close db_env_txn_checkpoint db_env_lock_detect |
119 | db_env_open db_env_close db_env_txn_checkpoint db_env_lock_detect |
120 | db_env_memp_sync db_env_memp_trickle db_env_dbrename db_env_dbremove |
120 | db_env_memp_sync db_env_memp_trickle db_env_dbrename db_env_dbremove |
121 | db_open db_close db_compact db_sync db_upgrade |
121 | db_open db_close db_compact db_sync db_upgrade |
… | |
… | |
572 | |
572 | |
573 | BerkeleyDB comes in various versions, many of them have minor |
573 | BerkeleyDB comes in various versions, many of them have minor |
574 | incompatibilities. This means that traditional "at least version x.x" |
574 | incompatibilities. This means that traditional "at least version x.x" |
575 | checks are often not sufficient. |
575 | checks are often not sufficient. |
576 | |
576 | |
577 | Example: set the log_autoremove option in a way compatible with <v.47 and |
577 | Example: set the log_autoremove option in a way compatible with <v4.7 and |
578 | v4.7. Note the use of & on the constants to avoid triggering a compiletime |
578 | v4.7. Note the use of & on the constants to avoid triggering a compiletime |
579 | bug when the symbol isn't available. |
579 | bug when the symbol isn't available. |
580 | |
580 | |
581 | $DB_ENV->set_flags (&BDB::LOG_AUTOREMOVE ) if BDB::VERSION v0, v4.7; |
581 | $DB_ENV->set_flags (&BDB::LOG_AUTOREMOVE ) if BDB::VERSION v0, v4.7; |
582 | $DB_ENV->log_set_config (&BDB::LOG_AUTO_REMOVE) if BDB::VERSION v4.7; |
582 | $DB_ENV->log_set_config (&BDB::LOG_AUTO_REMOVE) if BDB::VERSION v4.7; |