Net::LDAP::Extra(3)

πŸ’– NAME πŸ’–

Bestie, this is Net::LDAP::Extra(3) from the User Contributed Perl Documentation, and the name is Net::LDAP::Extra β€” its whole job is loading extra Net::LDAP methods. ✨


✨ SYNOPSIS ✨

  use Net::LDAP::Extra qw(my_extn);

  $ldap = Net::LDAP->new( ... );

  $ldap->my_extn( ... );

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so Net::LDAP::Extra lets extra methods be added to Net::LDAP. Normally, those methods would get added by sub-classing Net::LDAP, but honestly that gets messy β€” different people write different additions, and then other people want to use multiple of these sub-classes. Users end up having to create sub-classes of their own which inherit from all the extension sub-classes just so they can get all the features. 😭 It’s giving inheritance chaos, no cap.

Net::LDAP::Extra fixes the vibe by allowing methods to be added directly to all Net::LDAP objects. πŸ’… You do this by creating a class Net::LDAP::Extra::name which exports functions. Then a use Net::LDAP::Extra qw(name) will make these functions available as methods on all Net::LDAP objects. Slay. ✨

⚠️ Care should be taken when choosing names for the functions to export to ensure that they do not clash with others. Like, pick your function names carefully, bestie β€” no accidental name collisions, periodt. πŸ’€

πŸŽ€ SEE ALSO πŸŽ€

  • Net::LDAP::Extra::AD

mwah πŸ’‹ this page is from perl v5.42.0, dated 2024-01-02, and it’s the Net::LDAP::Extra(3) page β€” bye bestie 🫢✨

πŸ“¦ where this page comes from