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

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

Thread Previous | Thread Next
From:
Craig Milo Rogers
Date:
July 19, 2001 12:05
Subject:
Re: [PATCH for discussion] new feature: clamp %hash
Message ID:
20114.995569553@ISI.EDU
>To clamp down on a hash and disallow access to nonexistant keys:
>   clamp %hash, 1
>
>To unclamp:
>   clamp %hash, 0
>
>To query
>   my $clamped = clamp %hash;

    clamp %hash;
    unclamp %hasn;
    my $clampishness = clamped %hash;

	I think that these are cleaner than having the boolean second
parameter to "clamp".  Otherwise, I'd welcome this feature.

					Craig Milo Rogers

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