Permalink
Browse files

{Pre,PostRead}Read.pm: unbreak, use ASN.1 as of RFC 4527

Use AttributeSelection instead of the deprecated AttributeDescriptionList,
and SearchResultEntry instead of the ASN.1 structure from one of the early
drafts.
  • Loading branch information...
1 parent db02c55 commit e7432f3c30358318e6c2cc3b67ac593c4d5c36f8 @marschap marschap committed Dec 29, 2012
Showing with 5 additions and 5 deletions.
  1. +5 −5 lib/Net/LDAP/Control/PreRead.pm
@@ -7,9 +7,9 @@ package Net::LDAP::Control::PreRead;
use Net::LDAP::Control;
our @ISA = qw(Net::LDAP::Control);
-our $VERSION = '0.02';
+our $VERSION = '0.03';
-use Net::LDAP::ASN qw(AttributeDescriptionList prSearchResultEntry);
+use Net::LDAP::ASN qw(AttributeSelection SearchResultEntry);
use Net::LDAP::Entry;
use strict;
@@ -31,7 +31,7 @@ sub init {
sub attrs {
my $self = shift;
- $self->{asn} ||= $AttributeDescriptionList->decode($self->{value});
+ $self->{asn} ||= $AttributeSelection->decode($self->{value});
if (@_) {
delete $self->{value};
return $self->{asn} = [ @_ ];
@@ -46,7 +46,7 @@ sub entry {
my $entry;
if ($self->{value}) {
- my $data = $prSearchResultEntry->decode($self->{value});
+ my $data = $SearchResultEntry->decode($self->{value});
$entry = Net::LDAP::Entry->new;
$entry->decode($data, raw => $opt{raw} || $self->{raw});
@@ -60,7 +60,7 @@ sub value {
exists $self->{value}
? $self->{value}
- : $self->{value} = $AttributeDescriptionList->encode($self->{asn});
+ : $self->{value} = $AttributeSelection->encode($self->{asn});
}
1;

0 comments on commit e7432f3

Please sign in to comment.