Pod::Simple::Role::XHTML::WithPostProcess - Post process entire output from XHTML conversion
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);
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.
Two methods are provided which should be modified to make use of this role.
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.
$new_content
Called just before outputting the final document. $full_content is the full output. Expected to return the content to be output.
$full_content
See MetaCPAN::Pod::XHTML for support and contact information.
See MetaCPAN::Pod::XHTML for authors.
See MetaCPAN::Pod::XHTML for the copyright and license.
To install MetaCPAN::Pod::XHTML, copy and paste the appropriate command in to your terminal.
cpanm
cpanm MetaCPAN::Pod::XHTML
CPAN shell
perl -MCPAN -e shell install MetaCPAN::Pod::XHTML
For more information on module installation, please visit the detailed CPAN module installation guide.