Manual Reference Pages - PERL::CRITIC::POLICY::TICS::PROHIBITUSEBASE (3)
Perl::Critic::Policy::Tics::ProhibitUseBase - do not use base.pm
use base qw(Baseclass);
Youve seen that a hundred times, right? That doesnt mean that its a good
idea. It screws with $VERSION, it alters (for the worse) the exceptions
reported by failure-to-require, it doesnt let you call the base classs
import method, it pushes to @INC rather than replacing it, and it uses
and documents interactions with fields, which can lead one to believe
that fields are even remotely relevant to modern (or any!) development of Perl
There are a lot of ways around using base. Pick one.
This policy caused a bit of controversy, largely in this form:
These behaviors are either correct or can be worked around, and using base.pm
protects you from the problem of remembering to load prereqs and from
setting @INC at runtime.
These are true statements. My chosen workaround for all these problems is to
not use base.pm. That doesnt mean its a good idea for you, or anyone
else. Heck, it doesnt mean its a good idea for me, either. Its just my
preference. As with all Perl::Critic policies, you should decide whether its
right for you.
Ricardo SIGNES <email@example.com>
COPYRIGHT AND LICENSE
This software is copyright (c) 2007 by Ricardo SIGNES.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
|perl v5.20.3 ||PERL::CRITIC::POLICY::TICS::PROHIBITUSEBASE (3) ||2014-07-28 |
Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.