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
parent
7b9f96efe0
commit
9ea3f9dfe7
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue