From: Clif H. <cl...@di...> - 2001-02-05 16:19:39
|
> > Clif Harden <ch...@po...> wrote: > > + =item schema ( OPTIONS ) > > + > > + Request that a schema search be performed. This can be used to read > > + schema information. > > + > > + The result is an object of class L<Net::LDAP::Schema|Net::LDAP::Schema>. > > + Read this documentation for further information about methods that > > + can be preformed with this object. > > + > > + =over 4 > > + > > + =item dn > > + > > + If a DN is supplied, it will become the base object entry from > > + which the search for schema information will be conducted. If > > + no DN is supplied the base object entry will be determined from > > + the rootDSE entry. > > The changes look OK. I'd like to see it returning cached Schema objects, > because these are quite expensive to keep retrieving and parsing. My second > change of last week implemented a cache, it was kinda hacky but generally > the right sort of approach. When you do the $schema = $ldap->schema() function call, the $schema object stays around until you destroy it. This is the way I have been doing caching and I still use the schema methods to retrieve information when I need it. I do not have to write any new code. > > I'd suggest one change to the documentation above, to the effect that the > DN is the name of a subschema *subentry* containing the schema. ie replace > the word entry with subentry. I think that clarifies what it is doing. > I will leave this up to Graham to decide. > We still need a mechanism for retrieving subschema given the DN of a plain > entry (, which is by far and away the *best* way of getting schema. (Maybe > we can add this to Net::LDAP::Entry?) > I will leave this function for someone else to contribute. I have been using the objectClass attribute for this function since you can not be sure that a subschemaSubentry attribute will exist for any given entry. Since I use the caching method described above it works great for me. It may or may not work for anyone else. > Cheers, > > Chris > |