NAME
Acme::CPANModules::PERLANCAR::Avoided - List of modules I'm currently avoiding
VERSION
This document describes version 0.014 of Acme::CPANModules::PERLANCAR::Avoided (from Perl distribution Acme-CPANModulesBundle-PERLANCAR), released on 2023-11-01.
DESCRIPTION
This is a list of modules I'm currently avoiding to use in my code, for some reason. Most of the modules wered used in my code in the past.
Using a Dist::Zilla plugin Dist::Zilla::Plugin::Acme::CPANModules::Blacklist, you can make sure that during building, your distribution does not specify a prerequisite to any of the modules listed here. (You should make your own blacklist though).
ACME::CPANMODULES ENTRIES
- Log::Any
-
Startup overhead.
Author: PREACTION
After the 1.x version, I no longer prefer Log::Any and have developed an alternative called Log::ger.
Alternate modules: Log::ger
- List::MoreUtils
-
License confusion.
Author: REHSACK
For more information, see https://www.reddit.com/r/perl/comments/6ymdez/what_are_the_background_details_pertaining_to_the/.
Recent versions of List::Util have implemented many functions from List::MoreUtils.
Alternate modules: List::Util, List::SomeUtils, List::AllUtils
- Log::Any::IfLOG
-
Retired workaround.
Author: PERLANCAR
Alternate modules: Log::ger
- File::Flock
-
Too many deps.
Author: MUIR
I used to use File::Flock due to its simple interface. However, this module depends on things like AnyEvent, Data::Structure::Util, File::Slurp, et al, all of which seem unnecessary. Nowadays I'm opting to use File::Flock::Retry, or just plain
flock()
.Alternate modules: File::Flock::Retry
- File::Slurp
-
Not encoding-friendly.
Author: CAPOEIRAB
File::Slurp was created (1996) before Perl IO layers (5.8, 2002) and its API does not handle encoding properly. See: http://blogs.perl.org/users/leon_timmermans/2015/08/fileslurp-is-broken-and-wrong.html or discussion on RT.
Alternate modules: File::Slurper
- File::Slurp::Tiny
-
Discouraged by the author.
Author: LEONT
The author of File::Slurp::Tiny has discouraged its use and recommends his newer module File::Slurper.
Alternate modules: File::Slurper
- Exporter::Lite
-
Unnecessary, use Exporter instead.
Author: NEILB
I used to use this module because I didn't know that Exporter (since perl 5.8.3, 2004) can also be used without subclassing, i.e. instead of:
use Exporter; our @ISA = qw(Exporter); our @EXPORT = (...);
you can also use it like this:
use Exporter qw(import); our @EXPORT = (...);
Hence, this module (first released in 2001) is no longer necessary. Besides, this module has a worse startup overhead than Exporter and has less features. So there is absolutely no reason to use it.
Alternate modules: Exporter
- JSON
-
Somewhat broken.
Author: ISHIGAKI
JSON.pm is a discouraged module now, due to its somewhat broken backend handling and lack of support for Cpanel::JSON::XS. Consider switching to JSON::MaybeXS or perhaps just JSON::PP.
Alternate modules: JSON::MaybeXS, JSON::PP, Cpanel::JSON::XS
- JSON::XS
-
.
Author: MLEHMANN
Cpanel::JSON::XS is the fork of JSON::XS that fixes some bugs and adds some features, mainly so it's more compatible with JSON::PP. See the documentation of Cpanel::JSON::XS for more details on those.
Alternate modules: Cpanel::JSON::XS
- Module::Path
-
.
Author: NEILB
It's a nice little concept and module, and often useful. But the decision like defaulting to doing abs_path() (https://rt.cpan.org/Public/Bug/Display.html?id=100979), which complicates the module, makes its behavior different than Perl's require(), as well as opens the can of worms of ugly filesytem details, has prompted me to release an alternative. Module::Path::More also has the options to find .pod and/or .pmc file, and find all matches instead of the first.
Alternate modules: Module::Path::More
- String::Truncate
-
Author: RJBS
Has non-core dependencies to Sub::Exporter and Sub::Install.
Alternate modules: String::Elide::Tiny
- Module::AutoLoad
-
Contains remote exploit. Ref: https://news.perlfoundation.org/post/malicious-code-found-in-cpan-package (Jul 28, 2020).
Alternate modules: lib::xi, CPAN::AutoINC, Module::AutoINC
FAQ
What is an Acme::CPANModules::* module?
An Acme::CPANModules::* module, like this module, contains just a list of module names that share a common characteristics. It is a way to categorize modules and document CPAN. See Acme::CPANModules for more details.
What are ways to use this Acme::CPANModules module?
Aside from reading this Acme::CPANModules module's POD documentation, you can install all the listed modules (entries) using cpanm-cpanmodules script (from App::cpanm::cpanmodules distribution):
% cpanm-cpanmodules -n PERLANCAR::Avoided
Alternatively you can use the cpanmodules CLI (from App::cpanmodules distribution):
% cpanmodules ls-entries PERLANCAR::Avoided | cpanm -n
or Acme::CM::Get:
% perl -MAcme::CM::Get=PERLANCAR::Avoided -E'say $_->{module} for @{ $LIST->{entries} }' | cpanm -n
or directly:
% perl -MAcme::CPANModules::PERLANCAR::Avoided -E'say $_->{module} for @{ $Acme::CPANModules::PERLANCAR::Avoided::LIST->{entries} }' | cpanm -n
This Acme::CPANModules module also helps lcpan produce a more meaningful result for lcpan related-mods
command when it comes to finding related modules for the modules listed in this Acme::CPANModules module. See App::lcpan::Cmd::related_mods for more details on how "related modules" are found.
HOMEPAGE
Please visit the project's homepage at https://metacpan.org/release/Acme-CPANModulesBundle-PERLANCAR.
SOURCE
Source repository is at https://github.com/perlancar/perl-Acme-CPANModulesBundle-PERLANCAR.
SEE ALSO
Perl::Critic::Policy::Community::DiscouragedModules
Perl::Critic::Policy::Community::PreferredAlternatives
Acme::CPANModules - about the Acme::CPANModules namespace
cpanmodules - CLI tool to let you browse/view the lists
AUTHOR
perlancar <perlancar@cpan.org>
CONTRIBUTING
To contribute, you can send patches by email/via RT, or send pull requests on GitHub.
Most of the time, you don't need to build the distribution yourself. You can simply modify the code, then test via:
% prove -l
If you want to build the distribution (e.g. to try to install it locally on your system), you can install Dist::Zilla, Dist::Zilla::PluginBundle::Author::PERLANCAR, Pod::Weaver::PluginBundle::Author::PERLANCAR, and sometimes one or two other Dist::Zilla- and/or Pod::Weaver plugins. Any additional steps required beyond that are considered a bug and can be reported to me.
COPYRIGHT AND LICENSE
This software is copyright (c) 2023, 2021, 2020, 2019, 2018 by perlancar <perlancar@cpan.org>.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
BUGS
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=Acme-CPANModulesBundle-PERLANCAR
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.