- COPYRIGHT AND LICENSE
- SEE ALSO
Perl::Critic::Policy::Freenode::DiscouragedModules - Various modules discouraged from use
Various modules are discouraged by the denizens of #perl on Freenode IRC, for various reasons which may include: buggy behavior, cruft, performance problems, maintainer issues, or simply better modern replacements. This is a high severity complement to Perl::Critic::Policy::Freenode::PreferredAlternatives.
CGI.pm is an ancient module for communicating via the CGI protocol, with tons of bad practices and cruft. Use a modern framework such as those based on Plack (Web::Simple, Dancer2, Catalyst) or Mojolicious, they can still be served via CGI if you choose.
Coro no longer works on perl 5.22, you need to use the author's forked version of Perl. Avoid at all costs.
Error.pm is overly magical and discouraged by its maintainers. Try Throwable for exception classes in Moo/Moose, or Exception::Class otherwise. Try::Tiny or Try are recommended for the
FindBin is often used to retrieve the absolute path to the directory containing the initially executed script, a mechanism which is not always logically clear. Additionally, it has serious bugs on old Perls and can't be updated from CPAN to fix them. The Dir::Self module provides a straightforward
__DIR__ constant for the absolute path to the directory containing the current source file. The lib::relative module resolves passed relative paths to the current source file for the common case of adding local module include directories, and documents an example of achieving the same behavior with core modules.
File::Slurp gets file encodings all wrong, line endings on win32 are messed up, and it was written before layers were properly added. Use File::Slurper, "slurp" in Path::Tiny, "slurp" in Data::Munge, or "slurp" in Mojo::File.
IO::Socket::INET6 is an old attempt at an IPv6 compatible version of IO::Socket::INET, but has numerous issues and is discouraged by the maintainer in favor of IO::Socket::IP, which transparently creates IPv4 and IPv6 sockets.
Switch.pm is a buggy and outdated source filter which can cause any number of strange errors, in addition to the problems with smart-matching shared by its replacement, "The 'switch' feature" in feature (
when). Try Switch::Plain instead.
XML::Simple tries to coerce complex XML documents into perl data structures. This leads to overcomplicated structures and unexpected behavior. Use a proper DOM parser instead like XML::LibXML, XML::TreeBuilder, XML::Twig, or Mojo::DOM.
This policy is part of Perl::Critic::Freenode.
This policy is not configurable except for the standard options.
Copyright 2015, Dan Book.
This library is free software; you may redistribute it and/or modify it under the terms of the Artistic License version 2.0.