in reply to Re^3: How to turn a "developer code" into a "user code"
in thread How to turn a "developer code" into a "user code"

Great explanation, thank you !
I guess Readonly is not that useful for scalars, then; but better used for arrays and hashes.

  • Comment on Re^4: How to turn a "developer code" into a "user code"

Replies are listed 'Best First'.
Re^5: How to turn a "developer code" into a "user code"
by tobyink (Canon) on Mar 11, 2012 at 20:08 UTC

    Indeed.

    use constant does "work" for array and hash references, though not in an especially useful way. The reference to the hash/array becomes constant, but the contents of the hash/array can still be manipulated.