NAME
Pod::Simple::Role::XHTML::WithPostProcess - Post process entire output from XHTML conversion
SYNOPSIS
package MyPodParser;
with 'Pod::Simple::Role::XHTML::WithPostProcess';
around post_process => sub {
my ($self, $content) = @_;
$content =~ s/Foo/Bar/g;
return $content;
};
my $parser = MyPodParser->new;
$parser->output_string(\my $html);
$parser->parse_string_document($pod);
DESCRIPTION
Allows post-processing of entire converted Pod document before outputting. This role is meant to be used by other roles that need to do post processing on the full document that is output, rather than as the content is generated. On its own, this role will not have any impact on the content of the output.
METHODS
Two methods are provided which should be modified to make use of this role.
pre_process ( $new_content )
Called when initially adding content to the document. $new_content
is the content being added to the output document. Expected to return the content to be added to the output.
post_process ( $full_content )
Called just before outputting the final document. $full_content
is the full output. Expected to return the content to be output.
SUPPORT
See MetaCPAN::Pod::XHTML for support and contact information.
AUTHORS
See MetaCPAN::Pod::XHTML for authors.
COPYRIGHT AND LICENSE
See MetaCPAN::Pod::XHTML for the copyright and license.