--On Wednesday, August 30, 2006 6:44 PM -0500 Graham Barr <[EMAIL PROTECTED]> wrote:
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.
Thanks! With some help from a friend, I have this working. :) my $asn = Convert::ASN1->new; $asn->prepare('SEQUENCE { b BOOLEAN }'); my $pdu = $asn->encode(b=>1); # or 0 my $ValSortControl=Net::LDAP::Control->new( type=>"1.3.6.1.4.1.4203.666.5.14", critical=>0, value=>$pdu ); --Quanah -- Quanah Gibson-Mount Principal Software Developer ITS/Shared Application Services Stanford University GnuPG Public Key: http://www.stanford.edu/~quanah/pgp.html