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 +
$config{filetypes_conf}=
- $data_dir -> searchFile("filetypes.conf");
+ $data_dir -> getFiletypesConfPath("filetypes");
} else {
# 3.9 +
$config{filetypes_conf}=
my $gen;
if (! exists $highlighters{$langfile}) {
+ no warnings 'once';
$gen = highlight::CodeGenerator::getInstance($highlight::XHTML);
+ use warnings;
$gen->setFragmentCode(1); # generate html fragment
$gen->setHTMLEnclosePreTag(1); # include stylish <pre>
if ($data_dir){