Catch up to highlight 4.0 API change.

In 4.0, searchDataDir() is gone, replaced by initSearchDirectories().
Call the latter if available, else fall back to the former.
master
Amitai Schleier 2021-05-14 08:46:53 +02:00
parent 7b9f96efe0
commit 9ea3f9dfe7
1 changed files with 7 additions and 1 deletions

View File

@ -54,7 +54,13 @@ sub checkconfig () {
eval q{use highlight};
if (highlight::DataDir->can('new')) {
$data_dir=new highlight::DataDir();
$data_dir->searchDataDir("");
if ( $data_dir->can('initSearchDirectories') ) {
# 4.0+
$data_dir -> initSearchDirectories("");
} else {
# pre-4.0
$data_dir -> searchDataDir("");
}
} else {
$data_dir=undef;
}