I’m at the QAH, and have continued digging into some CPAN Testers fails for
Pod::Simple::Search. I previously emailed about this to cpan-workers, but it’s
become pod specific, so RJBS suggested this mailing list.
To fix some of them I made find() and survey() be consistent with respect to
what file extensions they consider.
Based on the following comment in the code …
https://metacpan.org/source/MARCGREEN/Pod-Simple-3.32/lib/Pod/Simple/Search.pm#L336
… I made the following be the order that file are considered:
.pod .pm .pl .plx
(which isn’t the usual order — .pod files are usually picked above all else)
This almost fixed things, but resulted in a few failures caused where the
system Pod/ directory had both of the following:
perlpodstyle
perlpodstyle.pod
(separate issue: how does this even happen? I’m at the QAH and will challenge a
few people with that)
What happens in this case is that survey() says that the right path for
perlpodstyle is perlpodstyle.pod, but find() says it’s the version without the
pod extension. This is down to this line of code:
https://metacpan.org/source/MARCGREEN/Pod-Simple-3.32/lib/Pod/Simple/Search.pm#L262
If I change that regexp to be:
m{^perl.*(\.pod)?$}s
Then it fixes the failing tests … I was ready to ship my next developer
release …
BUT
I talked this through with RJBS, who suggested the order should instead be:
.pod .pm .pl .plx
David, you added the comment to the code that’s mentioned above. Was there a
reason you added that comment, or were you just commenting on what the code was
doing? (like much of this module, it’s somewhat opaque :-)
Neil