From: Graham B. <gb...@us...> - 2003-05-09 12:03:45
|
Update of /cvsroot/perl-ldap/ldap/lib/Net/LDAP In directory sc8-pr-cvs1:/tmp/cvs-serv13502/lib/Net/LDAP Added Files: RootDSE.pm Log Message: New class for a RootDSE object --- NEW FILE: RootDSE.pm --- # Copyright (c) 2003 Chris Ridd <chr...@is...> and # Graham Barr <gb...@po...>. 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_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__ =head1 NAME Net::LDAP::RootDSE - An LDAP RootDSE object =head1 SYNOPSIS my $dse = $ldap->root_dse(); # get naming Contexts my @contexts = $dse->get_value('namingContext'); # get supported LDAP versions as an array reference my $versions = $dse->get_value('supportedLDAPVersion', asref => 1); =head1 DESCRIPTION =head2 Methods =over 4 =item get_value C<get_value> is identical to L<Net::LDAP::Entry/get_value> =item supported_extension ( OID_LIST ) Returns true if the server supports all of the specified extension OIDs =item supported_version ( VERSION_LIST ) Returns true if the server supports all of the specified versions =item supported_control ( OID_LIST ) Returns true if the server supports all of the specified control OIDs =item supported_sasl_mechanism ( SASL_MECH_LIST ) Returns true if the server supports all of the specified SASL mechanism names =back =head1 SEE ALSO L<Net::LDAP>, L<Net::LDAP::Entry> =head1 AUTHOR Chris Ridd E<lt>chr...@is...E<gt>, Graham Barr E<lt>gb...@po...E<gt>. =head1 COPYRIGHT Copyright (c) 2003, Chris Ridd and Graham Barr. All rights reserved. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. |