Net::LDAP::RootDSE - An LDAP RootDSE object


perl-ldap documentation Contained in the perl-ldap distribution.

Index


Code Index:

NAME

Top

Net::LDAP::RootDSE - An LDAP RootDSE object

SYNOPSIS

Top

 my $dse = $ldap->root_dse();

 # get naming Contexts
 my @contexts = $dse->get_value('namingContexts');

 # get supported LDAP versions as an array reference
 my $versions = $dse->get_value('supportedLDAPVersion', asref => 1);

DESCRIPTION

Top

Methods

get_value

get_value is identical to get_value in Net::LDAP::Entry

supported_extension ( OID_LIST )

Returns true if the server supports all of the specified extension OIDs

supported_feature ( OID_LIST )

Returns true if the server supports all of the specified feature OIDs

supported_version ( VERSION_LIST )

Returns true if the server supports all of the specified versions

supported_control ( OID_LIST )

Returns true if the server supports all of the specified control OIDs

supported_sasl_mechanism ( SASL_MECH_LIST )

Returns true if the server supports all of the specified SASL mechanism names

SEE ALSO

Top

Net::LDAP, Net::LDAP::Entry

AUTHOR

Top

Chris Ridd <chris.ridd@isode.com>, Graham Barr <gbarr@pobox.com>.

COPYRIGHT

Top


perl-ldap documentation Contained in the perl-ldap distribution.

# Copyright (c) 2003-2004 Chris Ridd <chris.ridd@isode.com> and
# Graham Barr <gbarr@pobox.com>. All rights reserved.  This program is
# free software; you can redistribute it and/or modify it under the
# same terms as Perl itself.

package Net::LDAP::RootDSE;

use Net::LDAP::Entry;

@ISA = qw(Net::LDAP::Entry);
$VERSION = "0.01";

use strict;

sub supported_feature        { _supported_feature( @_, 'supportedFeatures'       ) }
sub supported_extension      { _supported_feature( @_, 'supportedExtension'      ) }
sub supported_version        { _supported_feature( @_, 'supportedLDAPVersion'    ) }
sub supported_control        { _supported_feature( @_, 'supportedControl'        ) }
sub supported_sasl_mechanism { _supported_feature( @_, 'supportedSASLMechanisms' ) }

sub _supported_feature {
  my $root = shift;
  my $attr = pop;

  my %ext; @ext{ $root->get_value( $attr ) } = ();

  @_ == grep exists $ext{$_}, @_;
}

1;

__END__