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

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

Thread Previous | Thread Next
Nick Ing-Simmons
July 23, 2001 01:28
Re: [PATCH for discussion] new feature: clamp %hash
Message ID:
Jeffrey Friedl <> writes:
>Nick Ing-Simmons <> 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

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

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About