Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the CPAN-Meta CPAN distribution.

Report information
The Basics
Id: 75427
Status: resolved
Priority: 0/
Queue: CPAN-Meta

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

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: (no value)



Subject: CPAN::Meta::Requirements should handle bad versions more gracefully
C::M::R::_version_object calls version->parse, which could croak. This means we can't use C::M::R for cleaning up bad string hash parsing in C::M::Converter. However, it would suck to duplicate all the parsing logic in C::M::C. Idea: add a "bad_version_hook" attribute so we can do something like this: $r = CPAN::Meta::Requirements->new( { bad_version_hook => \&my_cleaner } ); Then have _version_object wrap version->parse in an eval and hand off to the bad_version_hook, if one exists. That would make it easy for C::M::C to use C::M::R and just inject it's own cleaning logic (which might be "assume 0" or might be something smarter depending on what exact prereqs phase/type is being converted).
fixed in 2.120620