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

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

Thread Previous
From:
Arthur Bergman
Date:
July 19, 2001 13:11
Subject:
Re: [PATCH for discussion] new feature: clamp %hash
Message ID:
B77D0B60.25E9%arthur@contiller.se
01-07-19 21.55, skrev Jeffrey Friedl på jfriedl@yahoo-inc.com följande:

> 
> And, since you can temporarily unclamp, it doesn't remove the functionality
> you wish (it just makes it ugly). But to go the other way actually lowers
> the overall functionality.
> 
> Here's an idea. It should be trivial to have two clamping bits:
> 
> clamp %hash, CLAMP_CREATE;
> clamp %hash, CLAMP_ACCESS;
> clamp %hash, CLAMP_ACCESS|CLAMP_CREAT;
> clamp %hash, CLAMP_ALL; # same as CLAMP_ACCESS|CLAMP_CREAT
> clamp %hash, CLAMP_NONE;
> 
> Jeffrey

Or we could extend SvREADONLY to support hashes, or we could make tie faster
by allowing C function pointer callbacks in a second tie interface and let
people do this using a module.

I agree however it is a cool feature and I sure would like clamp %hash,
CLAMP_ACCESS;

Could this be used to replace use fields? I think it could.

-- 
Arthur


Thread Previous


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