in reply to Override exists()?

exists should not return the value for the specified key; it should always return true if there is such a KEY (the value may be undefined or false).

Why don't you just return a true value for EXISTS and a list (or array-ref) of matches for FETCH?

J.

-- Joost downtime n. The period during which a system is error-free and immune from user input.

Replies are listed 'Best First'.
Re: Re: Override exists()?
by Mur (Pilgrim) on Dec 13, 2002 at 15:21 UTC
    I tried that, too, in the time since I posted:
    my @x = $hash{$key};
    But inside the code, wantarray is not set. I suppose I could just return a listref, but ... I'm stubborn.
    --
    Jeff Boes
    Database Engineer
    Nexcerpt, Inc.
    vox 269.226.9550 ext 24
    fax 269.349.9076
     http://www.nexcerpt.com
    ...Nexcerpt...Connecting People With Expertise