Grinnz / Perl-Critic-Community

Perl::Critic::Community - Community-inspired Perl::Critic policies
https://metacpan.org/pod/Perl::Critic::Community
Other
8 stars 10 forks source link

additional modules for DiscouragedModules / PreferredAlternatives #31

Open karenetheridge opened 5 years ago

karenetheridge commented 5 years ago
    my $homedir = $^O eq 'MSWin32' && "$]" < 5.016
      ? $ENV{HOME} || $ENV{USERPROFILE}
      : (<~>)[0];
Grinnz commented 5 years ago
perlpunk commented 5 years ago

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.

Grinnz commented 5 years ago

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.

Grinnz commented 5 years ago

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.

karenetheridge commented 2 years ago

also:

TryCatch -> Feature::Compat::Try / Syntax::Keyword::Try (anything using Devel::Declare should be considered deprecated now) Nice::Try -> "" (source filters, augh)