As of 3.51, searchFile() is no longer provided in highlight's Perl
bindings (at least on NetBSD and OS X, as built from pkgsrc). This
leaves us falling through to getConfDir(), which has been gone
rather longer.
From highlight git, it appears searchFile() and getFiletypesConfPath()
both originated in the 3.14 release. The latter is still available in
3.51, and returns the same result searchFile() used to. Switch to it.
if (! exists $config{filetypes_conf}) {
if (! $data_dir ) {
$config{filetypes_conf}= "/etc/highlight/filetypes.conf";
if (! exists $config{filetypes_conf}) {
if (! $data_dir ) {
$config{filetypes_conf}= "/etc/highlight/filetypes.conf";
- } elsif ( $data_dir -> can('searchFile') ) {
- # 3.18 +
+ } elsif ( $data_dir -> can('getFiletypesConfPath') ) {
+ # 3.14 +
- $data_dir -> searchFile("filetypes.conf");
+ $data_dir -> getFiletypesConfPath("filetypes");
} else {
# 3.9 +
$config{filetypes_conf}=
} else {
# 3.9 +
$config{filetypes_conf}=