Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

PAUSE is too clever (a minor matter)

by syphilis (Archbishop)
on May 22, 2007 at 12:19 UTC ( [id://616742]=perlquestion: print w/replies, xml ) Need Help??

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

Hi,
I have a module on CPAN. You can see that, under the "Modules" section of that webpage, "MyMod" is listed. And, under the "Other Files" section "demos/autowrap/README" is listed.

But those 2 files (both of which are located in the demos/autowrap folder) are part of a simple demo that, beyond being part of a simplistic demonstration, serve no useful purpose. I would prefer that they were not explicitly mentioned on that webpage. Is there any way of hiding them from PAUSE ?

Cheers,
Rob

Replies are listed 'Best First'.
Re: PAUSE is too clever (a minor matter)
by betterworld (Curate) on May 22, 2007 at 13:35 UTC
    In Build.PL, you can include something like this:
    no_index => { directory => 'demos', },
    (as arguments for Module::Build->new). This results into this code in META.yml:
    no_index: directory: demos

    Update: Now that petdance mentioned it (see below), I noticed that search.cpan.org shows the modules whether or not they are in no_index. Anyway I think it's a good thing to put example modules in no_index so they aren't included in the modules index.

      Oh ... interesting.

      I don't provide a Build.PL. Is there a MakeMaker equivalent ? I had a quick look through 'perldoc ExtUtils::MakeMaker' but didn't spot anything. (That doesn't mean it's not there, however :-)

      I don't even provide a META.yml, but I believe that file can be created by running 'make dist'. I guess I could create that file and insert by hand (if necessary) the appropriate 'no_index' entry that you provided ? (I take it that it's the MEYA.yml contents and not the Build.PL contents that's the defining element ?)

      Thanks, betterworld.

      Cheers,
      Rob
        guess I could create that file and insert by hand (if necessary) the appropriate 'no_index' entry that you provided ?
        I think so, according to PAUSE About page:
        The PAUSE indexer honours the contents of the no_index and the provides fields. All other fields are currently ignored.

        Open source softwares? Share and enjoy. Make profit from them if you can. Yet, share and enjoy!

Re: PAUSE is too clever (a minor matter)
by petdance (Parson) on May 22, 2007 at 20:48 UTC
    Please note that search.cpan.org is not PAUSE. How search.cpan.org displays the contents of modules is pretty much a black box.

    xoxo,
    Andy

      How search.cpan.org displays the contents of modules is pretty much a black box

      Yes - though in this instance it seems that 'no_index' does the trick. Both PAR and Win32::SharedFileOpen appear to be using it to hide the '.pm' files that are located in the 'inc' folder.

      I had only just uploaded a new version of my module before I started to wonder about it. The next version (which could be a while away) will include a META.yml - and then I'll find out for sure :-)

      Cheers,
      Rob
Re: PAUSE is too clever (a minor matter)
by jasonk (Parson) on May 23, 2007 at 11:17 UTC

    I've also seen several modules that hide themselves from PAUSE by breaking up the 'package' statement, something like this:

    package # hide from PAUSE MyMod;

    Although it is a black box, apparently the PAUSE indexer is a fairly simplistic black box...


    We're not surrounded, we're in a target-rich environment!
Re: PAUSE is too clever (a minor matter)
by leocharre (Priest) on May 23, 2007 at 21:59 UTC

    What about just putting it in t/ ? Your users could still download the package and look in there. I wonder if that would work.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2024-04-14 18:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found