… | |
… | |
546 | |
546 | |
547 | BerkeleyDB comes in various versions, many of them have minor |
547 | BerkeleyDB comes in various versions, many of them have minor |
548 | incompatibilities. This means that traditional "at least version x.x" |
548 | incompatibilities. This means that traditional "at least version x.x" |
549 | checks are often not sufficient. |
549 | checks are often not sufficient. |
550 | |
550 | |
|
|
551 | Example: set the log_autoremove option in a way compatible with <v.47 and |
|
|
552 | v4.7. Note the use of & on the constants to avoid triggering a compiletime |
|
|
553 | bug when the symbol isn't available. |
|
|
554 | |
|
|
555 | $DB_ENV->set_flags (&BDB::LOG_AUTOREMOVE ) if BDB::VERSION v0, v4.7; |
|
|
556 | $DB_ENV->log_set_config (&BDB::LOG_AUTO_REMOVE) if BDB::VERSION v4.7; |
|
|
557 | |
551 | =over 4 |
558 | =over 4 |
552 | |
559 | |
553 | =item BDB::VERSION |
560 | =item BDB::VERSION |
554 | |
561 | |
555 | The C<BDB::VERSION> function, when called without arguments, returns the |
562 | The C<BDB::VERSION> function, when called without arguments, returns the |