Skip Menu |

This queue is for tickets about the Module-Provision CPAN distribution.

Report information
The Basics
Id: 91320
Status: resolved
Priority: 0/
Queue: Module-Provision

People
Owner: Support [...] RoxSoft.co.uk
Requestors: RWSTAUNER [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.26.1
Fixed in: (no value)



Subject: Pod::Markdown url prefix arg is supported; overriding _resolv_link will not be.
I have rewritten Pod::Markdown to be based on Pod::Simple instead of Pod::Parser. I was checking how it is used by other modules on CPAN and noticed that Module::Provision hacks the private method `_resolv_link`. Unfortunately this method has been removed in the rewrite, but fortunately the last few versions of Pod::Markdown (1.400+) have accepted a 'perldoc_url_prefix' arg that I believe will support what you were trying to do. So please try out the latest version of Pod::Markdown (1.500) and use the constructor argument instead of redefining that method. If that works for you then you should be ready for when 2.000 comes out. If it does not, please report a bug on Pod::Markdown. Thanks!
Subject: module-provision-pod-markdown-arg.patch
--- Module-Provision-0.26.1/share/Build.PL 2013-11-25 14:28:39.000000000 -0700 +++ use-arg/share/Build.PL 2013-12-11 06:37:18.123724113 -0700 @@ -111,11 +111,8 @@ sub ACTION_distmeta { sub _create_readme_md { print "Creating README.md using Pod::Markdown\n"; require Pod::Markdown; - # Monkey patch Pod::Markdown to allow for configurable URL prefixes - no warnings qw(redefine); *Pod::Markdown::_resolv_link = \&_my_resolve_link; - my $self = shift; - my $parser = Pod::Markdown->new( url_prefix => $self->notes->{url_prefix} ); + my $parser = Pod::Markdown->new( perldoc_url_prefix => $self->notes->{url_prefix} ); my $path = $self->dist_version_from; open my $in, '<', $path or die "Path ${path} cannot open: ${!}"; @@ -125,32 +122,6 @@ sub _create_readme_md { return; } -sub _my_resolve_link { - my ($self, $cmd, $arg) = @_; local $self->_private->{InsideLink} = 1; - - my ($text, $inferred, $name, $section, $type) = - map { $_ && $self->interpolate( $_, 1 ) } - Pod::ParseLink::parselink( $arg ); - my $url = q(); - - if ($type eq q(url)) { $url = $name } - elsif ($type eq q(man)) { - my ($page, $part) = $name =~ m{ \A ([^\(]+) (?:[\(] (\S*) [\)])? }mx; - my $prefix = $self->{man_prefix} || q(http://man.he.net/man); - - $url = $prefix.($part || 1).q(/).($page || $name); - } else { - my $prefix = $self->{url_prefix} || q(http://search.cpan.org/perldoc?); - - $name and $url = "${prefix}${name}"; - $section and $url .= "#${section}"; - } - - $url and return sprintf '[%s](%s)', ($text || $inferred), $url; - - return sprintf '%s<%s>', $cmd, $arg; -} - sub _normalize_prereqs { # Dynamic config my $self = shift; my $p = $self->SUPER::_normalize_prereqs; return $p; }
Dropped create_readme_md from share/Build.PL Fixed in 0.27