File Coverage

blib/lib/Acme/CPANModules/PERLANCAR/Avoided.pm
Criterion Covered Total %
statement 6 6 100.0
branch n/a
condition n/a
subroutine 2 2 100.0
pod n/a
total 8 8 100.0


line stmt bran cond sub pod time code
1             package Acme::CPANModules::PERLANCAR::Avoided;
2              
3 1     1   341134 use strict;
  1         2  
  1         37  
4 1     1   4 use warnings;
  1         2  
  1         315  
5              
6             our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
7             our $DATE = '2023-11-01'; # DATE
8             our $DIST = 'Acme-CPANModulesBundle-PERLANCAR'; # DIST
9             our $VERSION = '0.014'; # VERSION
10              
11             our $LIST = {
12             summary => "List of modules I'm currently avoiding",
13             description => <<'_',
14              
15             This is a list of modules I'm currently avoiding to use in my code, for some
16             reason. Most of the modules wered used in my code in the past.
17              
18             Using a plugin
19             , you can make sure that
20             during building, your distribution does not specify a prerequisite to any of the
21             modules listed here. (You should make your own blacklist though).
22              
23             _
24             entries => [
25             {
26             module => 'Log::Any',
27             summary => 'Startup overhead',
28             description => <<'_',
29              
30             After the 1.x version, I no longer prefer and have developed an
31             alternative called .
32              
33             _
34             alternate_modules => ['Log::ger'],
35             },
36             {
37             'x.date' => '2017-09-08',
38             module => 'List::MoreUtils',
39             summary => 'License confusion',
40             description => <<'_',
41              
42             For more information, see
43             .
44              
45             Recent versions of have implemented many functions from
46             .
47              
48             _
49             alternate_modules => ['List::Util', 'List::SomeUtils', 'List::AllUtils'],
50             },
51             {
52             module => 'Log::Any::IfLOG',
53             summary => 'Retired workaround',
54             alternate_modules => ['Log::ger'],
55             },
56             {
57             module => 'File::Flock',
58             summary => 'Too many deps',
59             description => <<'_',
60              
61             I used to use due to its simple interface. However, this module
62             depends on things like , ,
63             , et al, all of which seem unnecessary. Nowadays I'm opting to
64             use , or just plain `flock()`.
65              
66             _
67             alternate_modules => ['File::Flock::Retry'],
68             },
69             {
70             module => 'File::Slurp',
71             summary => 'Not encoding-friendly',
72             description => <<'_',
73              
74             File::Slurp was created (1996) before Perl IO layers (5.8, 2002) and its API
75             does not handle encoding properly. See:
76            
77             or discussion on RT.
78              
79             _
80             alternate_modules => ['File::Slurper'],
81             },
82             {
83             module => 'File::Slurp::Tiny',
84             summary => 'Discouraged by the author',
85             description => <<'_',
86              
87             The author of File::Slurp::Tiny has discouraged its use and recommends his newer
88             module .
89              
90             _
91             alternate_modules => ['File::Slurper'],
92             },
93             {
94             module => 'Exporter::Lite',
95             summary => 'Unnecessary, use Exporter instead',
96             description => <<'_',
97              
98             I used to use this module because I didn't know that (since perl
99             5.8.3, 2004) can also be used without subclassing, i.e. instead of:
100              
101             use Exporter;
102             our @ISA = qw(Exporter);
103             our @EXPORT = (...);
104              
105             you can also use it like this:
106              
107             use Exporter qw(import);
108             our @EXPORT = (...);
109              
110             Hence, this module (first released in 2001) is no longer necessary. Besides,
111             this module has a worse startup overhead than *and* has less
112             features. So there is absolutely no reason to use it.
113              
114             _
115             alternate_modules => ['Exporter'],
116             },
117             {
118             module => 'JSON',
119             summary => 'Somewhat broken',
120             description => <<'_',
121              
122             JSON.pm is a discouraged module now, due to its somewhat broken backend handling
123             and lack of support for . Consider switching to
124             or perhaps just .
125              
126             _
127             alternate_modules => ['JSON::MaybeXS', 'JSON::PP', 'Cpanel::JSON::XS'],
128             },
129             {
130             module => 'JSON::XS',
131             summary => '',
132             description => <<'_',
133              
134             is the fork of that fixes some bugs and adds
135             some features, mainly so it's more compatible with . See the
136             documentation of for more details on those.
137              
138             _
139             alternate_modules => ['Cpanel::JSON::XS'],
140             },
141             {
142             module => 'Module::Path',
143             summary => '',
144             description => <<'_',
145              
146             It's a nice little concept and module, and often useful. But the decision like
147             defaulting to doing abs_path()
148             (https://rt.cpan.org/Public/Bug/Display.html?id=100979), which complicates the
149             module, makes its behavior different than Perl's require(), as well as opens the
150             can of worms of ugly filesytem details, has prompted me to release an
151             alternative. Module::Path::More also has the options to find .pod and/or .pmc
152             file, and find all matches instead of the first.
153              
154             _
155             alternate_modules => ['Module::Path::More'],
156             },
157             {
158             module => 'String::Truncate',
159             description => <<'_',
160              
161             Has non-core dependencies to and .
162              
163             _
164             alternate_modules => ['String::Elide::Tiny'],
165             },
166              
167             {
168             module => 'Module::AutoLoad',
169             description => <<'_',
170              
171             Contains remote exploit. Ref:
172             (Jul
173             28, 2020).
174              
175             _
176             alternate_modules => ['lib::xi', 'CPAN::AutoINC', 'Module::AutoINC'],
177             },
178             ],
179             };
180              
181             1;
182             # ABSTRACT: List of modules I'm currently avoiding
183              
184             __END__