Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

How does the CPAN indexer determin documentation

by SBECK (Chaplain)
on Oct 13, 2010 at 16:07 UTC ( [id://865115]=perlquestion: print w/replies, xml ) Need Help??

SBECK has asked for the wisdom of the Perl Monks concerning the following question:

In my Date::Manip module, I have a script that I use to automatically generate the timezone modules (including POD). Although I include the script in the distribution for the sake of completeness, it is never installed and is not strictly part of the module.

If you go to CPAN (http://search.cpan.org/~sbeck/Date-Manip-6.12/) and scroll to the bottom, you'll see (in the Documentation section) an obviously broken entry named Date::Manip::TZ::$module which refers to the internal script.

I've tried 'disguising' the strings that I think would trigger the CPAN indexer, but I only get one try per release, and so far, I haven't figured it out, so perhaps someone who is CPAN clueful can answer me. Can someone tell me exactly what criteria are used by the CPAN indexer to determine that something is a POD document? Alternately, if you point me to the actual scripts that do the indexing, I'll be happy to figure it out myself. I just want the indexer to ignore the internal script.

Thanks
  • Comment on How does the CPAN indexer determin documentation

Replies are listed 'Best First'.
Re: How does the CPAN indexer determin documentation
by Anonymous Monk on Oct 13, 2010 at 16:47 UTC
    FWIW, you could avoid pod inside strings by indent/dedent
    print $out map { s/^ //; $_ } split /\n/, " package Date::Manip: +:TZ::$module; # Copyright (c) 2008-$curr_year Sullivan Beck. All rights reserve +d. ... "
Re: How does the CPAN indexer determin documentation
by Anonymous Monk on Oct 13, 2010 at 16:18 UTC
      Thanks. I was able to disguise the '=head1' strings and I believe that this is fixed. I'll know next time I release it.

      Wrong S, L. The problem is with documentation being displayed on search.cpan.org, not PAUSE. All PAUSE does is figure out what versions of what modules are in a distribution. It assumes something is a module if it matches "/package\s+[\w:]+\s*;/" so if you want to "hide" a module from the indexer, the trick is to write the package declaration thus:

      package # blahblahblah;

      but you very rarely have to do this. And in any case, PAUSE doesn't index pure documentation files - if you look in 02packages, nary a mention will you find of Date::Manip::TZ::$module.

      Unfortunately, the source for search.cpan.org isn't available. It's maintained by GBARR, so you might like to submit a bug report to him.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://865115]
Approved by Corion
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (3)
As of 2024-04-19 15:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found