From: Pop M. <her...@ho...> - 2002-02-13 14:58:54
|
Apologies if this is a FAQ -- I searched the archives but couldn't see anything quite like what I wanted to do. I want to write a routine that returns the value of attribute 'Foo' for a given dn (which I'll find by setting a filter like "email=$mailaddr"). If the attribute doesn't exist, I want to take the dn and search in it's parent for the same attribute. (Now of course the filter will be different, presumably "Foo=*".) And so on up the directory tree until I find it. Sounds like an exercise in recursion, but I only got the shrink-wrap off of perl::ldap an hour ago and it sounds like it might be a common requirement for other people. Has anyone cracked this and got sample code they'd be willing to share? TIA, --herb |