Yes, but that's yet another one of the flaws of the documentation which tries to teach Perl's bare-bones OO through years of cruft. I'm trying not to rant about the silliness of "I want to learn how to do OO in Perl manually before I learn how to do it right with decent tools and documentation", but I'm not sure I can do it politely. Suffice it to say "This confusion is exactly what everyone should expect from trying to unify various tutorials written to various fads at various points in the past 20 years."
| [reply] |
| [reply] |
I choose Moose for the first edition of the Modern Perl book and am still happy with that. At the time, it was the most complete of all of the object systems. When I was revising that chapter for the 2014 edition, I thought about the decision again and stuck with Moose. It's the de facto standard for syntax among all of the Moosey alternatives. It's the basis for p5-mop. It has the most users and documentation. The other strong competitor is Moo, and that automatically upgrades its objects to Moose objects when you exceed the facilities Moo provides.
Another consideration—strictly from the writer's point of view—is that I didn't have to tell people to install something else to get the metaprogramming examples to run correctly.
I decided that a novice wouldn't go wrong learning Moose, because that novice could decide to switch to something else when he or she knew enough to make an informed decision. Even though I'm enjoying Moops in my personal projects right now, I'm not the target audience.
| [reply] |