Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

How does the CPAN indexer determin documentation

by SBECK (Hermit)
on Oct 13, 2010 at 16:07 UTC ( #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 ( 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.

  • 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, 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 isn't available. It's maintained by GBARR, so you might like to submit a bug report to him.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://865115]
Approved by Corion
Front-paged by Corion
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (8)
As of 2018-07-16 18:31 GMT
Find Nodes?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?

    Results (346 votes). Check out past polls.