EXPORT
get_highlighter
my $highlighter = get_highlighter($language);Returns a new
Syntax::Highlight::Engine::Katehighlighter for testing. Defaults to Perl if no language specified.All tokens are wrapped in tags corresponding to the token type:
<keyword>my</keyword>slurp
Slurps and returns the contents of a file.
my $files = get_sample_perl_files(); while ( my ( $perl, $highlighted ) = each %$files ) { ... }Returns a hashref. Keys are the names of the raw Perl files in t/perl/before and values are the filenames of the highlighted versions found in t/perl/highlighted.
See bin/regen.pl to understand how to regenerate these fixtures.
See t/perl_highlighting.t for an example of testing with this.
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 36:
Unknown directive: =teim