in reply to constant vector

Did you see Readonly::Array ?

If this doesn't fit your requirements maybe try Tie::Array to create an array which basically only allows FETCH but no STORE operations.

Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!

Replies are listed 'Best First'.
Re^2: constant vector
by wbirkett (Acolyte) on Aug 01, 2017 at 11:37 UTC
    The 'Readonly' module uses the now-deprecated 'Internals' module to set/clear the scalar read-only flag.
      The 'Readonly' module uses the now-deprecated 'Internals' module to set/clear the scalar read-only flag.

      Well, so does the core pragma constant, but it does seem like P5P might change the API in the future. For reference, here is the discussion that led to the creation of Internals.pod.

      > uses the now-deprecated Internals module to set/clear the scalar read-only flag.

      well it might currently use the "Internals" module.

      IMHO Readonly and constant are far too basic to become deprecated soon.

      Cheers Rolf
      (addicted to the Perl Programming Language and ☆☆☆☆ :)
      Je suis Charlie!