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

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

Thread Previous | Thread Next
Craig Milo Rogers
July 19, 2001 12:05
Re: [PATCH for discussion] new feature: clamp %hash
Message ID:
>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 Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About