Treat attribute names in LDIF change records in a case insensitive manor.

[email protected] (Raymond S Brand) Mon, 13 May 2013 12:59:43 -0400
Newsgroups perl.ldap
Message-ID <[email protected]>
LDIF_pm_patch.txt (text/plain, 855 B)
--- /usr/share/perl5/Net/LDAP/LDIF.pm	2012-01-29 04:26:12.000000000 -0500
+++ LDIF.pm	2013-05-13 11:51:12.881990101 -0400
@@ -233,7 +233,7 @@
           $self->_error("LDAP entry is not valid",@ldif); 
           return;
         }
-        $lastattr = $modattr = $2;
+        $lastattr = $modattr = lc $2;
         $modify  = $1;
       }
       my @values;
@@ -256,7 +256,7 @@
         }
  
         $line =~ s/^([-;\w]+):([\<\:]?)\s*// and
-	    ($attr, $xattr) = ($1, $2);
+	    ($attr, $xattr) = (lc $1, $2);
 
         # base64 encoded attribute: decode it
         if ($xattr eq ':') {
@@ -312,7 +312,7 @@
 
     foreach $line (@ldif) {
       $line =~ s/^([-;\w]+):([\<\:]?)\s*// &&
-	  (($attr, $xattr) = ($1, $2)) or next;
+	  (($attr, $xattr) = (lc $1, $2)) or next;
   
       # base64 encoded attribute: decode it
       if ($xattr eq ':') {