On 1/1/04 10:11 am, Graham Barr <[EMAIL PROTECTED]> wrote: > On 17 Dec 2003, at 09:06, Chris Ridd wrote: >>> >>> No, because lots of stuff is hidden. Consider what you have todo today >>> >>> $mesg = $ldap->delete(@args); >>> handle_referal($mesg) if (... check for referral ..); >>> >>> vs >>> >>> $ldap = Net::LDAP-.new(..., referral_connect => \&my_connect) >>> >>> $mesg= $ldap->delete(@args); >>> >>> Where referrals are done behind the scenes using &my_connect to create >>> the connection >> >> That doesn't help all that much, because the guts of handle_referal >> (sic) >> are similar to my_connect. You're just moving code around a bit. > > Not completely true, but I dont have to remember to add the line > handle_referal after every method call. Its all done in one place and > Net::LDAP calls it if needed.
That's true. > Also, handle_referal will have to do the actual operation and insert > the results into $mesg, but Net::LDAP will do that automatically. > my_connect will _only_ create a connection and authenticate to the > server, Net::LDAP will do everything else. I don't have too much of an objection to all this (apart from referral should be spelled with 3 letter 'r's ;-). It would be nice to expose this functionality in the same way as the 'onerror' callback so it can be turned on when required, etc. Cheers, Chris