#!/usr/local/bin/perl
my
$base
=
"cn=Burning Man,ou=people,dc=yourcompany,dc=com"
;
my
$webdsml
;
$webdsml
= Net::DSML->new( {
url
=>
$server
} );
$webdsml
->setRequestId( {
id
=>
"12356"
} );
@name
= ();
push
(
@name
,
"namingContexts"
);
push
(
@name
,
"supportedLDAPversion"
);
push
(
@name
,
"vendorName"
);
push
(
@name
,
"vendorVersion"
);
push
(
@name
,
"supportedSASLMechanisms"
);
if
(!(
$webdsml
->rootDSE( {
attributes
=> \
@name
} )))
{
print
"RootDSE error.\n"
;
print
$webdsml
->error,
"\n"
;
exit
;
}
if
( !(
$webdsml
->compare( {
dn
=>
$base
,
attribute
=>
"cn"
,
value
=>
"Super Man"
} ) ) )
{
print
"Compare error."
,
"\n"
;
print
$webdsml
->error,
"\n"
;
exit
;
}
if
(!(
$webdsml
->
send
()))
{
print
"RootDSE and Compare send request error.\n"
;
print
$webdsml
->error(),
"\n"
;
exit
;
}
$postData
=
$webdsml
->content();
print
$postData
,
"\n"
;