in reply to Re^4: Readonly vs ReadonlyX
in thread Readonly vs ReadonlyX

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!

And now I ask myself, what is wrong with Const::Fast ?

Cheers Rolf
(addicted to the 𐍀𐌴𐍂𐌻 Programming Language :)
Wikisyntax for the Monastery

  • Comment on Re^5: Readonly vs ReadonlyX (updated PC-Source + Const::Fast)

Replies are listed 'Best First'.
Re^6: Readonly vs ReadonlyX (updated PC-Source + Const::Fast)
by ikegami (Patriarch) on Mar 13, 2023 at 16:30 UTC

    Why do you think there's something wrong with Const::Fast? (There is a caveat listed in the docs, though.)

      > Why do you think there's something wrong with Const::Fast? (There is a caveat listed in the docs, though.)

      I don't, it's a rhetorical question.

      Meaning "why don't you use Const::Fast instead of ReadonlyX?".

      Cheers Rolf
      (addicted to the 𐍀𐌴𐍂𐌻 Programming Language :)
      Wikisyntax for the Monastery

Re^6: Readonly vs ReadonlyX (updated PC-Source + Const::Fast)
by rlauer (Novice) on Mar 10, 2023 at 15:50 UTC
    ;-) I never said that "slow and buggy" came from PBP...I referenced the output of perlcritic from whence it came - what did come from PBP (and yes this is probably old advice) "use constants but don't use constant" - in any event you have shone some light on why Readonly and ReadonlyX clash - thank you so much for your responses! (and yes I wish corporate InfoSec folks had some common sense and realized that not everything spewed out by some analyzer should be taken as gospel)