On 21/10/04 7:11 pm, Jesse, Rich <[EMAIL PROTECTED]> wrote:
> Hey Chris,
>
> Hmmm...very interesting! I tried the first one and it works (I was worried
> about partial matches, but now I see the start/end word regexp), and yes,
> asref and the second would probably be better for my program. I'm sure I can
> use this, but...
>
> I'm confused about the hash itself. It's probably a lack of Perl knowledge,
> but why can't:
>
> $oc->{MyHPUXClass}
>
> ...be used to determine if that value is present?
>
> Thanks!
> Rich
What you're looking for doesn't seem to exist. Internally the values of
objectclass (or any attribute) are held as an array, and all the different
options to get_value do is return the arrays in different ways. There's no
way to get back a hash containing keys which are the values. (But as you can
see it isn't hard to use grep to get what you're looking for.)
The alloptions thing lets you get back values for attributes differing by
attribute options (eg cn and cn;en). The documentation's got an example of
this, and also shows the structure of the returned hash.
I'd also suggest playing with the perl debugger's "x" command to dump out
the structure of the returned hash.
Cheers,
Chris