in reply to Packages, references, & data hiding...

On a side note, this might not do what you expect:
return @{$self->{'identities'}}; } else { return undef;
Since you seem to be pulling the results of this in a list context, your resulting array will contain something like this:
@success = ($identity1, $identity2, $identity3); @failure = (undef);
Either way, a test of @array in a scalar context is going to get you a non-zero/true value either way. Get into the habit of calling return witn no arguments when you want to return a 'false' value. This will return undef in a scalar context and an empty list in an array context, giving you the results you're looking for.
} else { return;

Replies are listed 'Best First'.
Re: Re: Packages, references, & data hiding...
by zzspectrez (Hermit) on Dec 04, 2000 at 01:14 UTC

    Ahhh.. Thank you for that tidbit. That would introduce a subtle bug. So the way I had it setup it would return true because in array context it would still have one element which happens to be the undef value..

    THANKS!!!!
    zzSPECTREz