I'm curious if anyone would be interested in a
$mesg->as_hash;
function. We currently have this implemented in an overlay perl module we use (Stanford::Directory) to make using returned results simpler for our client base.
Essentially, this allows you to do things like:
$uid = ($entry->uid)[0]; $displayName = ($entry->displayName);
Where "uid" is a multi-valued attribute, so uid[0] is the first value of the uid attribute.
I think this generally makes for easily readable and writeable output.
I would be interested in seeing what you did. But I suspect as_hash is not the right name. as_hash is probably a better name for the as_struct method that is already there.
In fact I suspect that it can be done by blessing the result of as_struct into a package which has only an AUTOLOAD method. Although that would not be very efficient
Graham.
