From: Chris R. <chr...@us...> - 2003-08-05 13:33:08
|
Update of /cvsroot/perl-ldap/ldap/lib/Net/LDAP In directory sc8-pr-cvs1:/tmp/cvs-serv9503 Modified Files: Schema.pod Log Message: Updated documentation style, corrected return type of all_attributes etc Index: Schema.pod =================================================================== RCS file: /cvsroot/perl-ldap/ldap/lib/Net/LDAP/Schema.pod,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- Schema.pod 7 May 2003 11:15:33 -0000 1.12 +++ Schema.pod 5 Aug 2003 13:33:04 -0000 1.13 @@ -10,19 +10,19 @@ # # Read schema from server # - $ldap = Net::LDAP->new( $server ); - $ldap->bind(); - $schema = $ldap->schema(); + $ldap = Net::LDAP->new ( $server ); + $ldap->bind ( ); + $schema = $ldap->schema ( ); # # Load from LDIF # $schema = Net::LDAP::Schema->new; - $schema->parse( "schema.ldif" ) or die $schema->error; + $schema->parse ( "schema.ldif" ) or die $schema->error; =head1 DESCRIPTION -B<Net::LDAP::Schema> provides a means to load an LDAP schema and query it +C<Net::LDAP::Schema> provides a means to load an LDAP schema and query it for information regarding supported objectclasses, attributes and syntaxes. =head1 METHODS @@ -34,105 +34,121 @@ =over 4 -=item all_attributes - -=item all_ditcontentrules +=item all_attributes ( ) -=item all_ditstructurerules +=item all_ditcontentrules ( ) -=item all_matchingrules +=item all_ditstructurerules ( ) -=item all_matchingruleuses +=item all_matchingrules ( ) -=item all_nameforms +=item all_matchingruleuses ( ) -=item all_objectclasses +=item all_nameforms ( ) -=item all_syntaxes +=item all_objectclasses ( ) -Returns a list of the names all the requested type in the schema +=item all_syntaxes ( ) - @attrs = $schema->all_attributes(); +Returns a list of all the requested types in the schema. Each item in +the list is a reference to a HASH; the various keys in each HASH are +named after the keys defined in RFC 2252: -=item attribute NAME_OR_OID + name + desc + obsolete + sup + equality + ordering + substr + syntax + single-value + collective + no-user-modification + usage + abstract + structural + auxiliary + must + may + applies + aux + not + oc + form -=item ditcontentrule NAME_OR_OID +=item attribute ( NAME ) -=item ditstructurerule NAME_OR_OID +=item ditcontentrule ( NAME ) -=item matchingrule NAME_OR_OID +=item ditstructurerule ( NAME ) -=item matchingruleuse NAME_OR_OID +=item matchingrule ( NAME ) -=item nameform NAME_OR_OID +=item matchingruleuse ( NAME ) -=item objectclass NAME_OR_OID +=item nameform ( NAME ) -=item syntax NAME_OR_OID +=item objectclass ( NAME ) -Returns a reference to a hash, or undef if the attribute does not exist. +=item syntax ( NAME ) - $attr_href = $schema->attribute( "attrname" ); +Returns a reference to a hash, or C<undef> if the schema item does not +exist. C<NAME> can be a name or an OID. -=item dump + $attr_href = $schema->attribute( "attrname" ); -=item dump FILENAME +=item dump ( ) -Given an argument which is the name of a file, and the file or -directory has write permission, will dump the raw schema -information to a file. If no argument is given the raw schema -information is dumped to standard out. +Dump the raw schema information to standard out. - $result = $schema->dump( "./schema.dump" ); +=item dump ( FILENAME ) - or +Dump the raw schema information to a file. - $result = $schema->dump(); + $result = $schema->dump ( "./schema.dump" ); -If no schema data is returned from directory server, the method -will return undefined. Otherwise a value of 1 is always returned. +If no schema data is returned from directory server, the method will +return undefined. Otherwise a value of 1 is always returned. -=item error +=item error ( ) Returns the last error encountered. -Given the name or oid of a schema item (matchingruleuse, ditstructurerule, -ditcontentrule or nameform respectively) returns the assoicated OID -or undef if the name or oid is not of the appropriate type. - -=item may +=item may ( OBJECTCLASS ) -Given an argument which is the name or oid of a known object class, returns -the names of the attributes which are optional in the class. +Given an argument which is the name or oid of a known object class, +returns the names of the attributes which are optional in the class. - @may = $schema->may( $oc ); + @may = $schema->may ( $oc ); -=item must +=item must ( OBJECTCLASS ) -Given an argument which is the name or oid of a known object class, returns -the names of the attributes which are mandatory in the class +Given an argument which is the name or oid of a known object class, +returns the names of the attributes which are mandatory in the class - @must = $schema->must( $oc ); + @must = $schema->must ( $oc ); -=item parse MESG +=item parse ( MESG ) -=item parse ENTRY +=item parse ( ENTRY ) -=item parse FILENAME +=item parse ( FILENAME ) -Takes a single argument which can be any of, A message objected returned from -an LDAP search, a Net::LDAP::Entry object or the name of a file containing -an LDIF form of the schema. +Takes a single argument which can be any of, a message object returned +from an LDAP search, a C<Net::LDAP::Entry> object or the name of a +file containing an LDIF form of the schema. -If the argument is a message result from a search, Net::LDAP::Schema will parse -the schema from the first entry returned. +If the argument is a message result from a search, +C<Net::LDAP::Schema> will parse the schema from the first entry +returned. Returns true on success and C<undef> on error. -=item superclass +=item superclass ( NAME ) -Given an argument which is the name or oid of a known objectclass, returns -the list of names of the immediate superclasses. +Given an argument which is the name or oid of a known objectclass, +returns the list of names of the immediate superclasses. =back |