AxAddOutputTransformer

Output transformers are applied just before output is sent to the browser. This directive adds a transformer to the list of transformers to be applied to the output.

AxAddOutputTransformer MyModule::Transformer

The transformer is a subroutine that accepts a line to process and returns the transformed line:

package MyModule; sub Transformer { my $line = shift;  . . .  return $line; }

You can use an output transformer to add dynamic output (such as the date and time or a customer name) to a cached page.

Get XML Publishing with AxKit now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.