From: Graham B. <gb...@us...> - 2003-05-06 12:40:36
|
Update of /cvsroot/perl-ldap/asn/lib/Convert In directory sc8-pr-cvs1:/tmp/cvs-serv12187/lib/Convert Modified Files: ASN1.pm ASN1.pod Log Message: CER and DER SET encoding Index: ASN1.pm =================================================================== RCS file: /cvsroot/perl-ldap/asn/lib/Convert/ASN1.pm,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- ASN1.pm 6 May 2003 11:07:19 -0000 1.24 +++ ASN1.pm 6 May 2003 12:40:32 -0000 1.25 @@ -21,7 +21,7 @@ } @ISA = qw(Exporter); - $VERSION = '0.16_01'; + $VERSION = '0.16_02'; %EXPORT_TAGS = ( io => [qw(asn_recv asn_send asn_read asn_write asn_get asn_ready)], @@ -109,7 +109,14 @@ sub configure { my $self = shift; my %opt = @_; - + + $self->{options}{encoding} = uc($opt{encoding} || 'BER'); + + unless ($self->{options}{encoding} =~ /^[BD]ER$/) { + require Carp; + Carp::croak("Unsupported encoding format '$opt{encoding}'"); + } + for my $type (qw(encode decode)) { if (exists $opt{$type}) { while(my($what,$value) = each %{$opt{$type}}) { Index: ASN1.pod =================================================================== RCS file: /cvsroot/perl-ldap/asn/lib/Convert/ASN1.pod,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- ASN1.pod 19 Aug 2002 23:59:18 -0000 1.7 +++ ASN1.pod 6 May 2003 12:40:32 -0000 1.8 @@ -63,7 +63,7 @@ =item encoding -One of 'ber', 'der', 'per'. I<Currently not used> +One of 'BER' or 'DER'. The default is 'BER' =back @@ -432,7 +432,7 @@ =head1 AUTHOR -Graham Barr <gb...@po...>, Report bugs via <bug...@rt...> +Graham Barr <gb...@po...>, Report bugs via <bug...@rt...> =head1 COPYRIGHT |