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

NAME

Pod::Simple::Role::XHTML::WithLinkMappings - Map module links to alternate URLs

SYNOPSIS

  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);

DESCRIPTION

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

ATTRIBUTES

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.

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.