in reply to CPAN's rendering of POD links

If I get rid of the -Cookbook, the link works perfectly well to take you to Inline::C. The %3A%3A is just a URI-encoding of ::. Therefore I don't think there is a problem with the way the link was generated from POD. Instead I suspect that the problem is that search.cpan.org expects to be showing links to things that could be valid Perl module names. The - in your URL can't be a valid Perl module name. As confirmation, searching for Inline::C-Cookbook doesn't turn up your file.

Change the name of the file and link to Inline::C_Cookbook and everything should work just fine.

Replies are listed 'Best First'.
Re^2: CPAN's rendering of POD links
by Anonymous Monk on Jan 01, 2009 at 13:20 UTC
      I'm not sure if its ever explicitly stated in any docs, but the NAME part before - is used for linking

      I was unaware of any of that. I think I can see what you're getting at. I'm a little puzzled as to how that "Inline::C-Cookbook" in the "NAME" is going to convey the information that the file is actually in the "C" directory (rather than the top-level directory ... or even the non-existent "C-Cookbook" directory).

      I'll give it a go, next release.

      Cheers,
      Rob
Re^2: CPAN's rendering of POD links
by syphilis (Archbishop) on Jan 02, 2009 at 00:31 UTC
      Fascinating. I'm sure this is a bug.

      If you look in, say, Rose::DB you'll see that they use 2 different kinds of links. The first is for ones in the uploaded distribution. The second is for ones which are in some other distribution. In that distribution it gets them right. The problem is that you are getting the "not my distribution" type of link for Inline::C-Cookbook, and it isn't working. Your good links are of the direct kind. I don't see an option for having 2 kinds of links in Pod::Html, so they are probably using some kind of custom parser (possibly derived from that one).

      (Possibly related is that in perl 5.8 if I type in pod2html Inline.pod > foo.html I see 5 warnings about being unable to resolve links. It is unable to resolve Inline-Support (2x), Inline-API (2x) and Inline-FAQ (1x). It does think it can resolve Inline::C-Cookbook. The difference is in the function page_sect in Pod::Html. It has conditional logic with a branch for /::/ that has different logic than the final else. If they hacked up that to get theirs, then this might be related. Or could just be coincidence.)

      So at this point I am confident that this is a bug. http://search.cpan.org/feedback has advice for how to give feedback. I'd use that to report the bug. In the meantime my original suggestion for renaming the file probably will succeed in working around their bug.

        http://search.cpan.org/feedback has advice for how to give feedback

        Thanks, tilly. I'll try giving the "feedback", as you suggest. (I'd prefer to not have to change the filename of C-Cookbook.pod ... but am prepared to change it if it's necessary.)

        Cheers,
        Rob
        I don't believe that CPAN is using pod2html or Pod::Html. The last time I looked into this subject, I had the impression they were using Pod::Simple::HTMLBatch.

        That's what I've got in my notes on the subject: Pod to Html.