Perl::...loading(3pm)

✨ NAME ✨

Okay so bestie, welcome to the Perl::...loading(3pm) page from the User Contributed Perl Documentation β€” and it's literally about one policy: Perl::Critic::Policy::ClassHierarchies::ProhibitAutoloading, aka AUTOLOAD methods should be avoided. No cap, that's the whole vibe. πŸŽ€


πŸ’– AFFILIATION πŸ’–

This Policy is part of the core Perl::Critic distribution β€” so it ships with the crew, it's not some random side quest you have to install separately. 🫢


🌸 DESCRIPTION 🌸

So here's the tea: if you declare a subroutine named AUTOLOAD, you violate this Policy. Periodt. πŸ’…

The AUTOLOAD mechanism is an easy way to generate methods for your classes β€” and like, sure, it's tempting, it's giving quick win, it's giving "I'll clean it up later" β€” but unless those methods are carefully written, those classes are difficult to inherit from. 😭 And over time, the AUTOLOAD method will become more and more complex as it becomes responsible for dispatching more and more functions. It literally snowballs. It does not stop. πŸ”₯

You're better off writing explicit accessor methods. Fr fr. Editor macros can help make this a little easier β€” not me recommending macros as a personality trait, just saying they exist and they help. ✨


πŸ¦‹ CONFIGURATION πŸ¦‹

This Policy is not configurable except for the standard options. That's it, that's the whole section. Nothing to tweak, nothing to vibe-check. πŸ™ˆ


⭐ AUTHOR ⭐

Jeffrey Ryan Thalhammer <jeff@imaginative-software.com> β€” the icon who wrote this policy. πŸ‘‘


Copyright (c) 2006-2011 Imaginative Software Systems. All rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. 🫢


πŸ’€ And that's the page! No hidden sections, no secret options, no plot twists β€” every single detail is right here, bestie.

Okay bye, go write those explicit accessor methods. πŸ’–βœ¨

Signing off from the perl v5.42.0 era, dated 2024-10-23 β€” this page is officially a throwback and honestly? It ate. πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from