Open karenetheridge opened 5 years ago
I'm not convinced a policy is needed for File::HomeDir, as the complexity is useful when you are looking for more than just the home directory. But maybe a candidate for PreferredAlternatives due to being over complicated for the majority of use cases.
Test::Requires should probably go to PreferredAlternatives. It's not quite as important since it will only be used in tests.
FindBin should definitely go to DiscouragedModules, but I have not yet collected the information as to why.
FindBin had problems in older versions, due to historical reasons. It was fixed in 2011 (perl 5.16): https://rt.perl.org//Public/Bug/Display.html?id=89698 https://metacpan.org/pod/release/DAGOLDEN/perl-5.15.0/pod/perldelta.pod
So I wonder why a module is discouraged (saw it in CPAN version 0.031) without even referencing why. If there are any other probems with it I'd like to know.
As mentioned in the description I added, this fix cannot be applied to someone running Perl 5.14 for instance, it will forever be broken there.
If it was made dual life, I would move it to PreferredAlternatives, where it would remain because the concept of initial script is unclear and there are better alternatives.
also:
TryCatch -> Feature::Compat::Try / Syntax::Keyword::Try (anything using Devel::Declare should be considered deprecated now) Nice::Try -> "" (source filters, augh)
Test::Requires -> Test::Needs: (quoted from docs) "Test::Requires will act as a "use" statement (despite its name), calling the import sub. Under "RELEASE_TESTING", it will BAIL_OUT if a module fails to load rather than using a normal test fail. It also doesn't distinguish between missing modules and broken modules."
FindBin -> Dir::Self - I'm sure there was an article somewhere talking about what's wrong with FindBin, but I haven't been able to find it - nevertheless Dir::Self is much simpler code.