From: Clif H. <ch...@us...> - 2002-01-03 03:01:16
|
Update of /cvsroot/perl-ldap/ldap/lib/Net/LDAP In directory usw-pr-cvs1:/tmp/cvs-serv31109/ldap/lib/Net/LDAP Modified Files: DSML.pm Log Message: Corrected _schemaToXML function 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: DSML.pm =================================================================== RCS file: /cvsroot/perl-ldap/ldap/lib/Net/LDAP/DSML.pm,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- DSML.pm 2002/01/01 03:39:36 1.11 +++ DSML.pm 2002/01/03 03:01:14 1.12 @@ -30,7 +30,7 @@ use Net::LDAP::Entry; use vars qw($VERSION); -$VERSION = "0.11"; +$VERSION = "0.12"; sub new { my $pkg = shift; @@ -173,7 +173,8 @@ # # Get the oid number of the object. # - $oid = $schema->name2oid( "$var" ); +# $oid = $schema->name2oid( "$var" ); + $oid = $schema->is_matchingrule( "$var" ); # # Get the name of this matchingrule # @@ -188,14 +189,14 @@ @atts = $schema->attributes(); $self->{'net_ldap_title'} = "attribute-type"; -$self->_schemaToXML( \@atts, $schema,$mrs) if ( @atts ); +$self->_schemaToXML( \@atts, $schema,$mrs,"is_attribute") if ( @atts ); # # Get the schema objectclasses # @atts = $schema->objectclasses(); $self->{'net_ldap_title'} = "objectclass-type"; -$self->_schemaToXML( \@atts,$schema,$mrs) if ( @atts ); +$self->_schemaToXML( \@atts,$schema,$mrs,"is_objectclass") if ( @atts ); } # End of _print_schema subroutine @@ -205,7 +206,7 @@ sub _schemaToXML() { -my ( $self,$ocs,$schema,$mrs ) = @_; +my ( $self,$ocs,$schema,$mrs,$method ) = @_; my $fh = $self->{'net_ldap_dsml_array'} or return; my $title = $self->{'net_ldap_title'} or return; @@ -219,7 +220,8 @@ # # Get the oid number of the object. # - my $oid = $schema->name2oid( "$var" ); +# my $oid = $schema->name2oid( "$var" ); + my $oid = $schema->$method( "$var" ); $container{'id'} = $var; $container{'oid'} = $oid; |