Pod::Simple::Role::XHTML::WithLinkMappings - Map module links to alternate URLs
package MyPodParser; with 'Pod::Simple::Role::XHTML::WithLinkMappings'; my $parser = MyPodParser->new; $parser->link_mappings({ 'Pod::Simple::Subclassing' => 'distribution/Pod-Simple/lib/Pod/Simple/Subclassing.pod', }); $parser->output_string(\my $html); $parser->parse_string_document($pod);
This role will allow mapping links in Pod to alternate locations, rather than using the module name directly.
Headings will be given multiple link targets. The primary ID will have very miminal filters. An additional target will be generated to match the behavior of Pod::Simple::XHTML. Also, a link will be generated using the first word of the target.
perlvar has headings like @_, which under normal filtering would end up with a target like pod1. With the additional targets, it has an actual useful target of @_. perlfunc also gains useful targets like open, rather than only targets like open-FILEHANDLE%2cEXPR
@_
pod1
open
open-FILEHANDLE%2cEXPR
A hashref of link sources to targets.
$parser->link_mappings({ 'Pod::Simple::Subclassing' => 'distribution/Pod-Simple/lib/Pod/Simple/Subclassing.pod', });
The resulting link is still combined with perldoc_url_prefix and perldoc_url_postfix.
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.