Skip Menu |

This queue is for tickets about the MarekPodHtml CPAN distribution.

Report information
The Basics
Id: 5344
Status: open
Priority: 0/
Queue: MarekPodHtml

People
Owner: Nobody in particular
Requestors: slaven [...] rezic.de
Cc:
AdminCc:

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



Subject: Link to external sites
I would like to see an option in mpod2html which turns on last-resort-linking to either www.perldoc.com or search.cpan.org or a custom URL. This would only trigger if no other suitable link target was found while running mpod2html. Regards, Slaven
On Sun Feb 15 19:41:40 2004, SREZIC wrote: Show quoted text
> I would like to see an option in mpod2html which turns on last-resort- > linking to either www.perldoc.com or search.cpan.org or a custom > URL. This would only trigger if no other suitable link target was > found while running mpod2html.
I still like to see this feature. www.perldoc.com does not exist anymore, but for search.cpan.org, it's just using http://search.cpan.org/perldoc?Modulename (where Modulename is URI-escaped) Regards, Slaven
On Fri Sep 22 17:32:16 2006, SREZIC wrote: Show quoted text
> On Sun Feb 15 19:41:40 2004, SREZIC wrote:
> > I would like to see an option in mpod2html which turns on last-resort- > > linking to either www.perldoc.com or search.cpan.org or a custom > > URL. This would only trigger if no other suitable link target was > > found while running mpod2html.
> > I still like to see this feature. www.perldoc.com does not exist > anymore, but for search.cpan.org, it's just using > > http://search.cpan.org/perldoc?Modulename (where Modulename is > URI-escaped) >
And finally a patch attached demonstrating how this may look. Of course the link destination should be changeable by option. Regards, Slaven
# # # To apply this patch: # STEP 1: Chdir to the source directory. # STEP 2: Run the 'applypatch' program with this patch file as input. # # If you do not have 'applypatch', it is part of the 'makepatch' package # that you can fetch from the Comprehensive Perl Archive Network: # http://www.perl.com/CPAN/authors/Johan_Vromans/makepatch-x.y.tar.gz # In the above URL, 'x' should be 2 or higher. # # To apply this patch without the use of 'applypatch': # STEP 1: Chdir to the source directory. # STEP 2: Run the 'patch' program with this file as input. # #### End of Preamble #### #### Patch data follows #### diff -up '../build/MarekPodHtml-0.49/lib/Marek/Pod/HTML.pm' 'MarekPodHtml-0.49/lib/Marek/Pod/HTML.pm' Index: ./lib/Marek/Pod/HTML.pm --- ./lib/Marek/Pod/HTML.pm Thu Jan 16 21:49:00 2003 +++ ./lib/Marek/Pod/HTML.pm Fri Sep 22 23:57:15 2006 @@ -1358,7 +1358,12 @@ sub _expand_ptree { { CLASS => 'POD_LINK', HREF => $destfile }; } else { - warn "Cannot find page `$page' at L<> on line $line\n"; + require URI::Escape; + #warn "Cannot find page `$page' at L<> on line $line\n"; + $self->{_link_pagemark} = $self->{_link_sectionmark} = 'a'; + $self->{_link_pageopt} = + $self->{_link_sectionopt} = + { CLASS => 'POD_LINK', HREF => "http://search.cpan.org/perldoc?" . URI::Escape::uri_escape($page) }; } } else { $dest = $self->{-mycache}; #### End of Patch data #### #### ApplyPatch data follows #### # Data version : 1.0 # Date generated : Fri Sep 22 23:59:47 2006 # Generated by : makepatch 2.00_12* # Recurse directories : Yes # Excluded files : (\A|/).*\~\Z # (\A|/).*\.a\Z # (\A|/).*\.bak\Z # (\A|/).*\.BAK\Z # (\A|/).*\.elc\Z # (\A|/).*\.exe\Z # (\A|/).*\.gz\Z # (\A|/).*\.ln\Z # (\A|/).*\.o\Z # (\A|/).*\.obj\Z # (\A|/).*\.olb\Z # (\A|/).*\.old\Z # (\A|/).*\.orig\Z # (\A|/).*\.rej\Z # (\A|/).*\.so\Z # (\A|/).*\.Z\Z # (\A|/)\.del\-.*\Z # (\A|/)\.make\.state\Z # (\A|/)\.nse_depinfo\Z # (\A|/)core\Z # (\A|/)tags\Z # (\A|/)TAGS\Z # p 'lib/Marek/Pod/HTML.pm' 55951 1158962235 0100644 #### End of ApplyPatch data #### #### End of Patch kit [created: Fri Sep 22 23:59:47 2006] #### #### Patch checksum: 52 2215 3324 #### #### Checksum: 70 2838 54788 ####