The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Pod::Elemental::Transformer::SynMux - apply multiple SynHi transformers to one document in one pass

VERSION

version 0.101000

SYNOPSIS

  my $xform = Pod::Elemental::Transformer::SynMux->new({
    transformers => [ @list_of_SynHi_transformers ],
  });

  $xform->transform_node( $pod_document );

OVERVIEW

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:

  #!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.

SEE ALSO

AUTHOR

Ricardo SIGNES <rjbs@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2014 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.