Erm, Scalar::Util::readonly reports but doesn't set the readonly flag:
readonly SCALAR Returns true if SCALAR is readonly. sub foo { readonly($_[0]) } $readonly = foo($bar); # false $readonly = foo(0); # true
In reply to Re^2: Constant string reference
by Fletch
in thread Constant string reference
by przemo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |