From: Mark W. <mew...@un...> - 2000-06-05 18:22:54
|
I didn't read this message before I made my earlier reply. If you replace your {} with [], your code should work as you expect without any other modifications. Mark On Mon, 5 Jun 2000, Eric S. Johansson wrote: > this is probably more of the perl problem than anything else but I'm trying > to figure out how to pass a dynamic list of attributes to LDAP add. The > base attribute list looks exactly like: > > $base_attributes = { > objectclass => 'minimalRadiusPerson', > ServiceType => '2', > FramedProtocol => 'PPP', > FramedMTU => '1500', > AscendIdleLimit => '900' > }; > > as the data source specifies additional attributes, I add them to the hash. > Passing them on the other hand has been a bit of a problem. I'm missing > something about perl references which will let me pass this reference to an > anonymous hash in as an attrs argument. I've tried different forms but I'm > not getting the right level of dereferencing. What I missing? > ... > $ldap_res = $mast_srv->add ($dn, > attrs => $base_attributes > ); > die "unable to add entry $dn " if ($ldap_res->code); > > > > > > |