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

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

Thread Previous | Thread Next
Jeffrey Friedl
July 20, 2001 16:26
Re: [PATCH for discussion] new feature: clamp %hash
Message ID:

|> Well, there are tradeoffs to his proposal, and they should at least be
|> mentioned.....

Sorry for the self-followup, but one overridingly important issue I forgot
to mention is that the semantics of marking an HV "readonly" can be quite
different than the marking of its individual values.


    my $ref = \$hash{SOMEKEY};
    somehow_mark_readonly %hash;

it is clear that
	$hash{SOMEKEY} = 3;
should not be allowed, but what about
	$$ref = 3;

I can imagine convincing arguments for semantics that do and don't
allow updates via the reference.


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