Closed Bug 3344 Opened 26 years ago Closed 25 years ago

RFE: New method to Entry.pm for new LDIF Module

Categories

(Directory :: PerLDAP, enhancement, P2)

All
Solaris
enhancement

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: leif, Assigned: leif)

Details

From John Kristian: To make this work better, I propose to add this code (or something like it) to Entry.pm: sub get_LDIF_records { my ($self) = @_; my @record = (dn => $self->getDN()); foreach my $attr (@{$self->{"_oc_order_"}}) { next if ($attr =~ /^_.+_$/); next if $self->{"_${attr}_deleted_"}; push @record, ($attr => $self->{$attr}); # This is dangerous: @record and %$self now both contain # references to the same array. To avoid this, copy it: # push @record, ($attr => [@{$self->{$attr}}]); # But that's not necessary, because the array and its # contents are not modified as a side-effect of getting # other attributes, from this or other LDAP::Entry's. } return \@record; } OK with you? Got a better idea?
Status: NEW → ASSIGNED
I did this, in devel-branch-1_3. RCS file: /cvsroot/mozilla/directory/perldap/Entry.pm,v revision 1.10.2.1 date: 1999/03/06 02:18:45; author: kristian%netscape.com added sub getLDIFrecords. changed sub printLDIF to use LDIF.pm, if possible.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Done.
You need to log in before you can comment on or make changes to this bug.