Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for pod2html links to ".html#foobar" #10688

Closed
p5pRT opened this issue Oct 3, 2010 · 8 comments
Closed

Fix for pod2html links to ".html#foobar" #10688

p5pRT opened this issue Oct 3, 2010 · 8 comments
Labels
ext/Pod-Html issues in the blead-upstream Pod-Html distribution hasPatch type-library

Comments

@p5pRT
Copy link

p5pRT commented Oct 3, 2010

Migrated from rt.perl.org#78190 (status was 'resolved')

Searchable as RT78190$

@p5pRT
Copy link
Author

p5pRT commented Oct 3, 2010

From occitan@esperanto.org

  long ago I experimented with various options till I finally managed to
generate makepp docs with --podpath=. --podroot=. --htmlroot=., which might
not be the official way, but the only one that worked for me. Later I noticed
that newer Perls (since about 5.8.7) sometimes link to .html#foobar. I have
now traced this down to the fact that files start with ./, probably if found
in my path. But pod2html takes everything before the 1st dot and adds .html.
My patch fixes that by changing to the everything before last dot.

coralament / best Grötens / liebe Grüße / best regards / elkorajn salutojn
Daniel Pfeiffer

--
lerne / learn / apprends / lär dig / ucz się Esperanto​:
  http​://lernu.net / http​://ikurso.net

@p5pRT
Copy link
Author

p5pRT commented Oct 3, 2010

From occitan@esperanto.org

Pod::Html.patch
--- old/Pod/Html.pm	2010-09-29 23:23:38.696072054 +0200
+++ new/Pod/Html.pm	2010-09-29 23:26:17.608673584 +0200
@@ -2021,7 +2021,7 @@
     # =item directive, then create a link to that page.
     if( defined $page ){
 	if( $page ){
-            if( exists $Pages{$page} and $Pages{$page} =~ /([^:.]*)\.[^:]*:/){
+            if( exists $Pages{$page} and $Pages{$page} =~ /([^:.]*)\.[^:.]*:/){
 		$page = $1 . '.html';
 	    }
 	    my $link = "$Htmlroot/$page#" . anchorify($fid);

@p5pRT
Copy link
Author

p5pRT commented Nov 27, 2011

From @cpansprout

On Sun Oct 03 10​:40​:59 2010, occitan@​esperanto.org wrote​:

long ago I experimented with various options till I finally managed
to
generate makepp docs with --podpath=. --podroot=. --htmlroot=., which
might
not be the official way, but the only one that worked for me. Later I
noticed
that newer Perls (since about 5.8.7) sometimes link to .html#foobar.
I have
now traced this down to the fact that files start with ./, probably if
found
in my path. But pod2html takes everything before the 1st dot and adds
.html.
My patch fixes that by changing to the everything before last dot.

coralament / best Gr�tens / liebe Gr��e / best regards / elkorajn
salutojn
Daniel Pfeiffer

Your patch does not apply against bleadperl, but there is a good chance
it has been fixed. Could you provide a test case, or try out blead
yourself?

--

Father Chrysostomos

@p5pRT
Copy link
Author

p5pRT commented Nov 27, 2011

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Nov 28, 2011

From occitan@esperanto.org

la 11/27/2011 07​:07 AM Father Chrysostomos via RT skribis​:

On Sun Oct 03 10​:40​:59 2010, occitan@​esperanto.org wrote​:

long ago I experimented with various options till I finally managed
to
generate makepp docs with --podpath=. --podroot=. --htmlroot=., which
might
not be the official way, but the only one that worked for me. Later I
noticed
that newer Perls (since about 5.8.7) sometimes link to .html#foobar.
I have
now traced this down to the fact that files start with ./, probably if
found
in my path. But pod2html takes everything before the 1st dot and adds
.html.
My patch fixes that by changing to the everything before last dot

Your patch does not apply against bleadperl, but there is a good chance
it has been fixed. Could you provide a test case, or try out blead
yourself?

Gosh, I don't remember. I have somehow worked around this in the makepp doc,
so I don't know what the test case was.

And you scare me by saying that it has been rewritten on top of Pod​::Simple!
I still have the trauma of 5.8.7 wantonly switching to incompatible (and too
primitive, e.g. case insensitive) =item links. That made me fix L<links> all
over the place. I hope you didn't repeat that nightmare!

Otoh I hope you finally made X<anchors> work, even though for makepp, which is
backwards compatible to 5.6, that is useless...

coralament / best Grötens / liebe Grüße / best regards / elkorajn salutojn
Daniel Pfeiffer

--
lerne / learn / apprends / lär dig / ucz się Esperanto​:
  http​://lernu.net / http​://ikurso.net

@p5pRT
Copy link
Author

p5pRT commented Jul 18, 2013

From @tonycoz

On Mon Nov 28 13​:37​:33 2011, occitan@​esperanto.org wrote​:

la 11/27/2011 07​:07 AM Father Chrysostomos via RT skribis​:

On Sun Oct 03 10​:40​:59 2010, occitan@​esperanto.org wrote​:

My patch fixes that by changing to the everything before last dot

Your patch does not apply against bleadperl, but there is a good
chance
it has been fixed. Could you provide a test case, or try out blead
yourself?

Gosh, I don't remember. I have somehow worked around this in the
makepp doc,
so I don't know what the test case was.

And you scare me by saying that it has been rewritten on top of
Pod​::Simple!
I still have the trauma of 5.8.7 wantonly switching to incompatible
(and too
primitive, e.g. case insensitive) =item links. That made me fix
L<links> all
over the place. I hope you didn't repeat that nightmare!

Otoh I hope you finally made X<anchors> work, even though for makepp,
which is
backwards compatible to 5.6, that is useless...

I tested this with a pod file test.pod which linked to test2.pod in the
same directory.

Then ran​:

~/perl/v5.19.1-487-gdd686e5/bin/pod2html5.19.2 --podpath=. --podroot=.
--htmlroot=. --infile=test.pod --outfile=test.html

This produced the html​:

<p><a href="./test2.html">test2</a></p>

So assuming my test is good, this is fixed.

I'll close this in a few days unless the requestor can provide a test
case that fails.

Tony

@p5pRT
Copy link
Author

p5pRT commented Jul 26, 2013

From @tonycoz

On Wed Jul 17 18​:00​:11 2013, tonyc wrote​:

So assuming my test is good, this is fixed.

I'll close this in a few days unless the requestor can provide a test
case that fails.

Closing.

Tony

@p5pRT
Copy link
Author

p5pRT commented Jul 26, 2013

@tonycoz - Status changed from 'open' to 'resolved'

@p5pRT p5pRT closed this as completed Jul 26, 2013
@jkeenan jkeenan added the ext/Pod-Html issues in the blead-upstream Pod-Html distribution label Mar 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ext/Pod-Html issues in the blead-upstream Pod-Html distribution hasPatch type-library
Projects
None yet
Development

No branches or pull requests

2 participants