On Aug 30, 2006, at 2:57 PM, Quanah Gibson-Mount wrote:
--On Tuesday, August 29, 2006 4:00 PM -0700 Quanah Gibson-Mount
<[EMAIL PROTECTED]> wrote:
Now of course, I'm getting decoding error messages from the server.
sigh.
This seems to be because the Net::LDAP::Control is not storing the
value
for "value" correctly. It should be an integer 1, or at least a
boolean.
TRUE doesn't work any better.
Okay, the problem seems to be because the value for "value" is not
getting ASN.1 encoded. I see the pre-defined controls have things
like:
sub value {
my $self = shift;
$self->{value} = $SortResult->encode($self->{asn});
}
Yes, the value element is usually ASN.1 encoded and every control has
its own encoding, so it is not possible to have the ::Control module
do the right encoding for any given module.
If you look at the other modules you will see they create a
Convert::ASN1 object to perform encode/decode. You need to do the
same for your control.
Or if you do not want to do that and your control is very simple. You
could determine the byte encodings for the possible values and pass
those to the ::Control module.
Graham.