Skip Menu |

This queue is for tickets about the Module-Build CPAN distribution.

Report information
The Basics
Id: 19140
Status: open
Priority: 0/
Queue: Module-Build

People
Owner: Nobody in particular
Requestors: chromatic [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Unimportant
Broken in: 0.27_09
Fixed in: (no value)



Subject: Provides-Finder Too Aggressive
The mechanism used to find packages for the provides field in META.yml is too aggressive. In my SUPER distribution, it found package statements for DB and UNIVERSAL, yet the module only adds subroutines to those packages -- it is not the primary source of code for either package. You can see the generated META.yml on the CPAN: http://search.cpan.org/src/CHROMATIC/SUPER-1.12/META.yml In cases like this, PAUSE currently sends an e-mail to the uploader that he or she does not have permission to update the registered modules. (In my case, I have permission to upload new versions of SUPER, but neither DB nor UNIVERSAL.) It would be nice to be able to exclude packages, if making the scanner less aggressive is too difficult.
From: Randy W. Sims <randys [...] thepierianspring.org>
On Sun May 07 20:14:40 2006, CHROMATIC wrote: Show quoted text
> The mechanism used to find packages for the provides field in META.yml > is too aggressive. In my SUPER distribution, it found package > statements for DB and UNIVERSAL, yet the module only adds subroutines to > those packages -- it is not the primary source of code for either package.
I can't think of a good heuristic to determine what should be or shouldn't be indexed. I think probably the best alternative is to use the 'no_index' argument to Module::Build's constructor (which seems to be undocumented, but that's an oversight; it is a stable feature). Eg. use Module::Build; my $builder = Module::Build->new( module_name => 'Foo', license => 'perl', no_index => { package => [ 'Foo::Bar', ] }, ); See <http://module-build.sourceforge.net/META-spec-current.html#no_index> for the complete format. The module will still show up under 'provides', but CPAN should ignore the entry. You may want to confirm this with Andreas, but I believe that to be correct. Show quoted text
> In cases like this, PAUSE currently sends an e-mail to the uploader that > he or she does not have permission to update the registered modules. > (In my case, I have permission to upload new versions of SUPER, but > neither DB nor UNIVERSAL.)
That is so that your dist doesn't show up when someone does a cpansearch for a module that you are not the primary maintainer of, or so that when someone runs CPAN.pm or CPANPLUS to install a module it doesn't grab your distro when trying to install UNIVERSAL, for example. It's not the smoothest process, but I'm not sure how to automate it. It would seem to require M::B to look at CPAN when creating meta to exclude any modules already registered, and that isn't an attractive solution. Probably the best we can do is to better document this issue... Randy.
Subject: find_dist_packages() ignores no_index
RT-Send-CC: module-build [...] perl.org
On Sun May 07 20:14:40 2006, CHROMATIC wrote: Show quoted text
> It would be nice to be able to exclude packages, if making the > scanner less aggressive is too difficult.
Also see: http://www.nntp.perl.org/group/perl.module.build/2007/09/msg923.html Particularly: http://www.nntp.perl.org/group/perl.module.build/2007/09/msg929.html We can't give much control over the scanner, but we should look at no_index when generating provides. The above thread implies that this may or may not solve the problem in PAUSE (it appears that the current pause indexer will not simply take 'provides' as-written.)