Update of /cvsroot/perl-ldap/asn/lib/Convert
In directory sc8-pr-cvs1:/tmp/cvs-serv9128/lib/Convert
Modified Files:
ASN1.pm
Log Message:
Add support for ANY DEFINED BY
Patch from Simon Wilkinson
Index: ASN1.pm
===================================================================
RCS file: /cvsroot/perl-ldap/asn/lib/Convert/ASN1.pm,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- ASN1.pm 6 May 2003 12:40:32 -0000 1.25
+++ ASN1.pm 6 May 2003 21:29:07 -0000 1.26
@@ -42,7 +42,7 @@
$EXPORT_TAGS{all} = \@EXPORT_OK;
@opParts = qw(
- cTAG cTYPE cVAR cLOOP cOPT cCHILD
+ cTAG cTYPE cVAR cLOOP cOPT cCHILD cDEFINE
);
@opName = qw(
@@ -177,6 +177,15 @@
$ret;
}
+sub registeroid {
+ my $self = shift;
+ my $oid = shift;
+ my $handler = shift;
+
+ $self->{options}{oidtable}{$oid}=$handler;
+ $self->{oidtable}{$oid}=$handler;
+}
+
# In XS the will convert the tree between perl and C structs
sub _pack_struct { $_[0] }
@@ -239,6 +248,7 @@
my (%stash, $result);
my $script = $self->{script};
my $stash = (1 == @$script && !$self->{script}[0][cVAR]) ? \$result : ($result=\%stash);
+
_decode(
$self->{options},
$script,
@@ -248,6 +258,7 @@
undef,
[],
$_[0]);
+
$result;
};
if ($@) {
|