From: Clif H. <ch...@us...> - 2002-01-03 02:53:56
|
Update of /cvsroot/perl-ldap/ldap/contrib In directory usw-pr-cvs1:/tmp/cvs-serv29596/ldap/contrib Modified Files: tklkup Log Message: Corrected schema parse and display code to comprehend that a multi-valued oid number could be returned from name2oid method. Now use the is_attribute, is_objectclass, ..., methods to determine oid number. Index: tklkup =================================================================== RCS file: /cvsroot/perl-ldap/ldap/contrib/tklkup,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- tklkup 2001/12/29 22:53:47 1.23 +++ tklkup 2002/01/03 02:53:53 1.24 @@ -22,6 +22,12 @@ # # Revisions: # $Log$ +# Revision 1.24 2002/01/03 02:53:53 charden +# +# Corrected schema parse and display code to comprehend that a multi-valued +# oid number could be returned from name2oid method. Now use the +# is_attribute, is_objectclass, ..., methods to determine oid number. +# # Revision 1.23 2001/12/29 22:53:47 charden # # Added code to allow the schema information to be stored in a file as @@ -1257,6 +1263,7 @@ my $list = shift; my $ocs = shift; my $Title = shift; +my $method = shift; foreach ( @$ocs) { @@ -1265,7 +1272,8 @@ # # Get and display the oid number of the objectclass. # - my $oid = $schemaHash{'schema'}->name2oid( "$_" ); + my $oid = $schemaHash{'schema'}->$method( "$_" ); +# my $oid = $schemaHash{'schema'}->name2oid( "$_" ); # # Get the various other items associated with @@ -1657,7 +1665,7 @@ if ( $selectAll || $selectAtt ) { -&print_loop($schema_list, $schemaHash{'atts'}, "attributeType") +&print_loop($schema_list, $schemaHash{'atts'}, "attributeType", "is_attribute") if ( defined($schemaHash{'atts'}) ); } @@ -1687,7 +1695,7 @@ if ( $selectAll || $selectObj ) { -&print_loop($schema_list, $schemaHash{'ocs'}, "objectClasses") +&print_loop($schema_list, $schemaHash{'ocs'}, "objectClasses", "is_objectclass") if ( defined($schemaHash{'ocs'}) ); } @@ -1705,7 +1713,7 @@ if ( $selectAll || $selectMatch ) { -&print_loop($schema_list, $schemaHash{'mrs'}, "matchingRules" ) +&print_loop($schema_list, $schemaHash{'mrs'}, "matchingRules", "is_matchingrule" ) if ( defined($schemaHash{'mrs'}) ); } @@ -1722,7 +1730,7 @@ if ( $selectAll || $selectMru ) { -&print_loop($schema_list, $schemaHash{'mru'}, "matchingRuleUse" ) +&print_loop($schema_list, $schemaHash{'mru'}, "matchingRuleUse", "is_matchinruleuse" ) if ( defined($schemaHash{'mru'}) ); } @@ -1739,7 +1747,7 @@ if ( $selectAll || $selectSyn ) { -&print_loop($schema_list, $schemaHash{'lsyn'}, "ldapSyntax" ) +&print_loop($schema_list, $schemaHash{'lsyn'}, "ldapSyntax", "is_syntax" ) if ( defined($schemaHash{'lsyn'}) ); } @@ -1756,7 +1764,7 @@ if ( $selectAll || $selectNf ) { -&print_loop($schema_list, $schemaHash{'nfm'}, "nameForms" ) +&print_loop($schema_list, $schemaHash{'nfm'}, "nameForms", "is_nameform" ) if ( defined($schemaHash{'nfm'}) ); } @@ -1773,7 +1781,7 @@ if ( $selectAll || $selectDsr ) { -&print_loop($schema_list, $schemaHash{'dits'}, "ditstructurerules" ) +&print_loop($schema_list, $schemaHash{'dits'}, "ditstructurerules", "is_ditstructurerule" ) if ( defined($schemaHash{'dits'}) ); } @@ -1790,7 +1798,7 @@ if ( $selectAll || $selectDcr ) { -&print_loop($schema_list, $schemaHash{'ditc'}, "ditcontentrules" ) +&print_loop($schema_list, $schemaHash{'ditc'}, "ditcontentrules", "is_ditcontentrule" ) if ( defined($schemaHash{'ditc'}) ); } |