pause
pause copied to clipboard
Parsing makes cuckooed packages inherit first packages version
As discovered by @neilbowers, this file: https://metacpan.org/source/NEILB/Text-Autoformat-1.69/lib/Text/Autoformat.pm
Entered the index such that the single file mapped to:
{ "Text::Autoformat" : 0.69,
"Text::Autoformat::Hang" : 0.69,
"Text::Autoformat::NullHang": 0.69 }
Whereas expected indexing was:
{ "Text::Autoformat" : 0.69,
"Text::Autoformat::Hang" : null,
"Text::Autoformat::NullHang": null }
He recently shipped his distribution with Module::Build, which automatically did meta.provides
for him:
https://metacpan.org/diff/file?target=NEILB/Text-Autoformat-1.70/&source=NEILB/Text-Autoformat-1.69/
It mimicked the expected pattern above
{ "Text::Autoformat" : 0.70,
"Text::Autoformat::Hang" : null,
"Text::Autoformat::NullHang": null }
And caused a "Backwards versioning" issue.
It is believed that the original behaviour of indexing the latter packages under the same version as the former is an error.
This feels like a recent regression to me -- surely if this behaviour had always been there we would have noticed it sooner.
Maybe, but I'm not sure what change might have introduced this kind of thing recently. Anyway, easy to test and probably easy to fix! :)
No. It's been there for quite a long time, at least since 2003 (I stopped tracking when I found the following example, but it should be older).
https://github.com/andk/pause/blob/2633f058b2f312d7336ae3948e088eb3edfc9112/cron/mldistwatch#L1403
If we do need to make PAUSE work like Module::Build, just replacing $version in the following line with "undef" (and reindex every non-simile packages) should do the trick, but I'm not so sure which should be fixed actually.
https://github.com/andk/pause/blob/master/lib/PAUSE/pmfile.pm#L312