Pod::Elemental::Transformer::SynMux - apply multiple SynHi transformers to one document in one pass
version 0.100250
my $xform = Pod::Elemental::Transformer::SynMux->new({ transformers => [ @list_of_SynHi_transformers ], }); $xform->transform_node( $pod_document );
SynMux uses an array of SynHi transformers to perform syntax highlighting markup in one pass over the input Pod.
If multiple transformers for the same format name have been given, an exception will be thrown at object construction time.
Also, if the format_name attribute for the transformer is set (and it defaults to set, to synmux) then a single hunk of code may be marked to be syntax highlighted by multiple highlighters, then concatenated together, for example:
format_name
synmux
#!synmux #!perl print "This code will be highlighted with the #!perl highlighter."; #!vim javascript console.log("...and this code by VimHTML javascript syntax.");
All the shebang lines will be stripped. Assuming the syntax highlighting transformers all behave close to the standard behavior, you'll end up with one code box with multiple styles of highlighting in it, which can be useful for marking up one document with a few kinds of syntax.
Pod::Elemental::Transformer::SynHi
Ricardo SIGNES <rjbs@cpan.org>
This software is copyright (c) 2010 by Ricardo SIGNES.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Pod::Elemental::Transformer::SynHi, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Pod::Elemental::Transformer::SynHi
CPAN shell
perl -MCPAN -e shell install Pod::Elemental::Transformer::SynHi
For more information on module installation, please visit the detailed CPAN module installation guide.