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

Re: [PATCH] core-only patch for clamp/readonly hashes

Thread Previous | Thread Next
Nicholas Clark
November 1, 2001 05:04
Re: [PATCH] core-only patch for clamp/readonly hashes
Message ID:
On Thu, Nov 01, 2001 at 12:50:43PM +0000, Nick Ing-Simmons wrote:
> Graham Barr <> writes:
> >So why make exists an exception to the rule ? Surly people can mistype
> >the element name passed to exists just as easily.
> My view is that exists isn't a special case - I said:
>  >exists $hash{baz};  # error - not an allowed key

Don't we want enough flexibility (and flags) to allow both behaviours?

If exists is a warning on not allowed keys then passing a reference to one
of these restricted hashes into older code not specifically expecting one
could start making warnings appear which cry wolf.

But if exists is not a warning then typos will be missed.

Nicholas Clark

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