From: Graham B. <gb...@po...> - 2001-02-05 16:38:36
|
On Mon, Feb 05, 2001 at 10:21:30AM -0600, Clif Harden wrote: > > > > 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. I don't think it is the place of Net::LDAP to do the caching. As you say these can be quite large and for Net::LDAP tp cache them could just be a waste on memory. It should eb up to the user application to cache the object returned. > > 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. Sounds fine to me. > > 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. Patches welcome. Graham. > > 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 > > > > |