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

Re: restricted hashes, and other readonlyness (was "clamp...")

Thread Previous | Thread Next
Nick Ing-Simmons
November 3, 2001 10:57
Re: restricted hashes, and other readonlyness (was "clamp...")
Message ID:
Jeffrey Friedl <> writes:
>Nick Ing-Simmons <> wrote:
>|> I would like concrete examples of places where delete-ing keys is 
>|> vital to the application.
>You really can't imagine an object that is intended to be used with a fixed
>universe of keys, yet one whose actual membership set within that universe
>is dynamic?

A. I cannot actually think of one where setting value to undef would 
   not suffice.
B. What I can 'imagine' isn't really interesting - I don't want to 
   solve imaginary problems, but real ones.

>A sort grep through some common libraries quickly yields a few
>likely candidates:
>      the various IO::Socket objects

There are only two occurances of 'delete' in those - and in both cases
the hash in question seems to be the creation arg list - not the 
object - the caller is unlikely to have restricted the arg list for us ...

>      Net::FTP object

A possible - Graham care to comment?

>      ExtUtils::MakeMaker

MakeMaker's object hashes are a law unto themselves, I know _my_ 
Makefile.PL's abuse them for all sorts of junk...

>      the param has in
>      the object
>|> But if you can get the compromise "seconded" by other people - then a
>|> slightly cleaned up version is possible candidate for 5.8.
>Mmmm, I thought that's what most others in this thread have been doing.
>      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