insaniac has asked for the wisdom of the Perl Monks concerning the following question:

Hi All,

yesterday I posted DBD::LDAP and Class::DBI situation, today I discovered something freakish ;-)

So, eventually I started thinking "Something must be wrong with data being sent to me".. and my assumptions seem to be correct.
Whenever the Netscape LDAP server sends values for an attribute which is an array (such as the objectclass attr of a person), the Class::DBI object (my MVG::User) is empty (I mean, all the correct keys are created, but they all have undef values). So I saved my ass by simply removing the objectclass attribute (from the __PACKAGE__->columns(All => qw//) ).

Of course, this is a workaround. What if this attribute is of importance to me?
So my question for today: how do we solve this? When I receive data in an array form from an OpenLDAP server, there are no problems.. only when the Netscape LDAP server sends one.

Anyhow... thanks! (also to the ones that helped me yesterday, much appreciated..)

UPDATE: Also when the values contain HTML tags, it seems to fail the retrieval of the values. So if only ONE of the attributes contain just one HTML tag, the Class::DBI object is empty again. So this is probably a DBD::LDAP issue?

to ask a question is a moment of shame
to remain ignorant is a lifelong shame

Replies are listed 'Best First'.
Re: DBD::LDAP and Class::DBI situation, part 2
by perrin (Chancellor) on Apr 08, 2005 at 16:16 UTC
    What do these array attributes turn into when OpenLDAP sends them? Class::DBI does not have any ability to handle attributes being arrays instead of scalars.
      normally it should get stringified with an output separator. and i think that's not happening

      to ask a question is a moment of shame
      to remain ignorant is a lifelong shame