As I said you should track down the source and reasoning behind this policy, before overly relying on it.
Furthermore, perlcritic has plenty of config options and severity levels.
TIMTOWTDI.
| [reply] |
Agreed...and thank you. As I said in the original post blindly following advice is a recipe for problems...and yes I can exclude Readonly from the list of discouraged modules when running perlcritic. Pipelines controlled by corporate security teams however do not encourage (or sometimes even allow) modification of .perlcriticrc. I appreciate the responses, but my opinion of the wisdom of the advice presented in perlcritic is only sometimes relevant and under my control. Moreover this still leaves me with the issue of Readonly vs ReadonlyX clashing.
| [reply] |
My guess by comparing the styles is that the author of ReadonlyX also wrote this PC-policy. (see below, it's from Dan Book)
And as already explained this module is far newer than PBP.
Nothing we could do about the cargo-cult policies of your company.
update
This seems to be the source of the policy Perl::Critic::Policy::Community::PreferredAlternatives and not PBP!
- Readonly
Readonly.pm is buggy and slow. Use Const::Fast or ReadonlyX instead, or the core pragma constant.
And now I ask myself, what is wrong with Const::Fast ?
| [reply] |