From c75987aa13f55b938c8bbbe3b2685be29fc9deb2 Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Mon, 16 Mar 2009 10:12:57 +0000 Subject: [PATCH] support ARRAY values from yaml file --- bin/ldap-rewrite.pl | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/bin/ldap-rewrite.pl b/bin/ldap-rewrite.pl index d3d8da0..6d2fa2d 100755 --- a/bin/ldap-rewrite.pl +++ b/bin/ldap-rewrite.pl @@ -108,12 +108,11 @@ sub log_response { foreach my $type ( keys %$data ) { my $vals = $data->{$type}; - $vals =~ s{#\s*$}{}; - - my @vals = split(/\s*#\s*/, $vals); - push @{ $response->{protocolOp}->{searchResEntry}->{attributes} }, - { type => $config->{overlay_prefix} . $type, vals => [ @vals ] }; + push @{ $response->{protocolOp}->{searchResEntry}->{attributes} }, { + type => $config->{overlay_prefix} . $type, + vals => ref($vals) eq 'ARRAY' ? $vals : [ $vals ], + }; } } -- 2.20.1