Oh?
use constant FOO => { x => 0 }; print FOO->{x}; # 0 ++ FOO->{x}; print FOO->{x}; # 1
Readonly also makes sure your entire data structure is readonly. constant only does that to the topmost level.
⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊
In reply to Re^3: OOP - Constant Vs. Subroutine
by diotalevi
in thread OOP - Constant Vs. Subroutine
by 2xlp
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |