The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

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

SYNOPSIS

  package MyPodParser;
  use Moo;
  extends 'Pod::Simple::XHTML';
  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.

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.