logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

[Module::Build] provides field plugged into PAUSE: msg#00106

Subject: [Module::Build] provides field plugged into PAUSE
I wanted to let you guys know, that the "provides" field has now found
its way into the CPAN indexer on PAUSE.

A huge thank you for providing that, it's a big step forward towards a
meta-data based CPAN.

The last couple of days I spent with comparisons between the original
PAUSE indexer and Module::Build. I found one subtle but critical
difference that needs further considerations.

Rocco Caputo will probably be irritated when he releases the next
version of POE. POE has the following structure:

    ----POE-0.31/lib/POE/Kernel.pm----
    package POE::Kernel;
    $VERSION = "1.0314";
    ----------------------------------

    ----POE-0.31/lib/POE/Resource/Signals.pm----
    package POE::Resources::Signals;
    $VERSION = do {my@r=(q$Revision: 1.13 
$=~/\d+/g);sprintf"%d."."%04d"x$#r,@r};
    $VERSION = "1.0013";
    package POE::Kernel;
    --------------------------------------------

The PAUSE indexer correctly indexed the package POE::Kernel with
"1.0314", but the META.yml says

  POE::Kernel:
    file: lib/POE/Resource/Signals.pm
    version: 1.0013

I think, the best fix for that would be to always only index the first
package name per pm file. I don't know how many packages would suffer
from that, but I'd say it's always better to index too few packages
than it is to index too many. And completeness is not our main
concern, correctness for the most important namespaces is. Authors may
tweak the resulting META.yml anyway, and it is probably easier for
them to add a package than it is to remove mistakes. The former can be
done in a trivial script, the latter needs some intelligence.

There are more distributions that would benefit from that:

    file                                  erroneously indexed package

    Module/CPANTS/Generator/Unpack.pm     text
    Class/ClassDecorator.pm               super
    Apache/SSI.pm                         main
    Devel/ebug.pm                         filename

Finally there's one more thing that one may consider a bug:
Module::Build indexes *.pl files too. The distribution
PTANDLER/PBib/Bundle-PBib-2.08 is an example for a case where this
leads to a long list of modules that probably should not end up in the
indexer.

Thanks again,
-- 
andreas


-------------------------------------------------------
This SF.Net email is sponsored by: New Crystal Reports XI.
Version 11 adds new functionality designed to reduce time involved in
creating, integrating, and deploying reporting solutions. Free runtime info,
new features, or free trial, at: http://www.businessobjects.com/devxi/728


<Prev in Thread] Current Thread [Next in Thread>