in reply to Re: Readonly problems (Devel::Peek, Scalar::Util::readonly bug)
in thread Readonly problems
Faster way to readonly are Attribute::Constant, Data::Lock, Scalar::Readonly,
use Scalar::Readonly qw/ readonly_on /; use Devel::Peek qw/ Dump /; my $f=66; readonly_on($f); Dump($f); __END__ SV = IV(0x99ba38) at 0x99ba3c REFCNT = 1 FLAGS = (PADMY,IOK,READONLY,pIOK) IV = 66
Scalar::Readonly::readonly also simply checks for SvREADONLY flag, and no others (no FAKE), so it'll be a false positive on HASH keys
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Readonly problems ( Scalar::Readonly::readonly )
by runrig (Abbot) on Dec 17, 2013 at 01:47 UTC | |
by choroba (Cardinal) on Dec 17, 2013 at 14:53 UTC | |
by runrig (Abbot) on Dec 17, 2013 at 16:47 UTC | |
by choroba (Cardinal) on Dec 17, 2013 at 17:08 UTC |