I’m converting a site over to LDAP from NIS. It’s a legacy HPC shop with dollars on the line for every minute of unavailability, so there’s lots of stuff that “they”, both vendors and customers, don’t really want to fix if it ain’t broke. Converting from NIS to LDAP is one of those sticky gray areas, especially when you’re talking about decades of legacy. Fortunately the problem area is restricted to just administrative stuff — no end-user type of access was ever supported. Limits the machines running special things to just a handful.
Having taken a good look at the various NIS/LDAP wrappers available, none really seemed to fit the bill precisely in a clean enough fashion for my sense of taste… My airplane reading for last year’s SAGE conference was Perl Best Practices, and I’ve noticed a marked improvement in the quality of code that I’ve been able to write since then. Following some of the guidelines, such as leaning on Pod::Usage for automatic documentation, and designing around the data, really makes an impact. Writing code that catches error conditions and reports on them in meaningful ways is also a useful practice — I’m particularly fond of the beginning section that pulls in all the required perl modules in a graceful(tm) fashion.
Continue reading