At 10:06 PM 9/24/2001 -0400, Michael G Schwern wrote:
>Wouldn't it be nice if there was a way to change the default value of
>a hash? So instead of undef you'll get whatever default you like?
Sure, I don't see why not. The hash access function is responsible for
returning a value, so there's no reason you shouldn't be able to override
it. Whether that's a core feature now is another issue, of course, but
there won't be anything to stop you. You can also do trickery to not
autovivify elements of the array or hash if they're only read and don't exist.
I'm pretty sure you can do this now with tie, but that's kind of heavy-weight.
Dan
--------------------------------------"it's like this"-------------------
Dan Sugalski even samurai
[EMAIL PROTECTED] have teddy bears and even
teddy bears get drunk