I've requested this to rjbs numerous times on irc, but just for a record purpose I post it here.
I want to parse and handle CPAN Meta spec's "Version Range" object as a first class object. CPAN::Meta::Requirements has a fine API, but its interface is always string representation based and always works with paris of (module => version range), and the internal _Range classes are kept private.
This has led me to:
have to do a double parsing after CMR's normalization to construct MetaCPAN query for example (this has been addressed by #21 though)
have to have a fake module name when all I want is a "is this version acceptable by this version range?" operation.
I think moving _Range classes to a public class and making __entry_for a public method (like version_range_for_module) is a great start. Additionally, a simple parse API such as CPAN::Meta::Version::Range->parse($str) would be nice to have.
I've requested this to rjbs numerous times on irc, but just for a record purpose I post it here.
I want to parse and handle CPAN Meta spec's "Version Range" object as a first class object. CPAN::Meta::Requirements has a fine API, but its interface is always string representation based and always works with paris of (module => version range), and the internal _Range classes are kept private.
This has led me to:
I think moving _Range classes to a public class and making
__entry_for
a public method (likeversion_range_for_module
) is a great start. Additionally, a simple parse API such asCPAN::Meta::Version::Range->parse($str)
would be nice to have.