develooper Front page | perl.perl5.porters | Postings from July 2001

Re: [PATCH for discussion] new feature: clamp %hash

Thread Previous | Thread Next
From:
Nick Ing-Simmons
Date:
July 23, 2001 01:28
Subject:
Re: [PATCH for discussion] new feature: clamp %hash
Message ID:
20010723082832.1664.1@bactrian.ni-s.u-net.com
Jeffrey Friedl <jfriedl@yahoo.com> writes:
>Nick Ing-Simmons <nick@ing-simmons.net> wrote:
>|> >(Which would be a nice feature as
>|> >well, and even moreso, it would imply that we could then have readonly
>|> >scalars.)
>|> 
>|> We can already.
>
>Could you give me a pointer to where I might find more information about
>this?

A scalar is an SV * - so just turn on its SvREADONLY bit.

>
>|> I am willing to put hooks into the core to get croaks when 
>|> a READONLY hash is accessed.
>
>Would you be willing to outline how that might be done?

Take your patch and change test for clampped-ness to test SvREADONLY.


>
>	Jeffrey
-- 
Nick Ing-Simmons
http://www.ni-s.u-net.com/


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About