thaljef / Pinto

Curate your own repository of Perl modules
https://metacpan.org/module/Pinto::Manual
66 stars 49 forks source link

Cannot index Storable > v2.51 #244

Open mschout opened 6 years ago

mschout commented 6 years ago

Pinto is unable to index the module Storable for versions > 2.51.

Looking into this, it seems that that the META provides for Storable has changed. In v2.51, Pinto was able to index this module, and there was only a META.yml at that time (no META.json).

The next release in metacpan is 3.05, which has a META.json, but it does not declare a provides section.

The next release is 3.08, and it declares provides file Storable_pm.PL The rest of the releases (3.09 thorugh 3.11), have provides file __Storable__.pm

One way to fix this in Pinto is to add a workaround in Pinto::Schema::Result::Package::can_index() such as:

    # Workaround for Storable
    return 1 if $self->name eq 'Storable'
        and ($self->file eq 'Storable_pm.PL' or $self->file eq '__Storable__.pm');

I'll gladly submit a PR for this if this is the preferred way to handle this. I'm not well versed enough in the CPAN Meta Spec to know if what Storable is doing here is correct so not sure if it would be more appropriate to file this over there.

fzipi commented 4 years ago

Had a problem with Storable 3.15 and this small workaround worked perfectly. I think it deserves a PR.