/usr/share/doc/libhighlight-perl/examples/testmod.pl is in libhighlight-perl 3.8-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | # Perl SWIG module test script
#
# Import highlight.pm, which is the interface for the highlight.so module.
# See highlight.pm for all available attributes and class members.
use highlight;
#get a generator instance (for HTML output)
my $gen = highlight::CodeGenerator::getInstance($highlight::CodeGenerator::HTML);
my $dir = new highlight::DataDir();
$dir->searchDataDir("");
my $themepath=$dir->getThemePath("seashell.theme");
my $langpath=$dir->getLangPath("c.lang");
#initialize the generator with a colour theme and the language definition
$gen->initTheme($themepath);
$gen->loadLanguage($langpath);
#set some parameters
$gen->setIncludeStyle(1);
$gen->setEncoding("ISO-8859-1");
#get output string
my $output=$gen->generateString("int main(int argc, char **argv) {\n".
" HighlightApp app;\n".
" return app.run(argc, argv);\n".
"}\n");
print $output;
# clear the instance
highlight::CodeGenerator::deleteInstance($gen);
|