Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: Recap: The Future of Perl 5by tobyink (Canon) |
on Aug 23, 2018 at 18:18 UTC ( [id://1220943]=note: print w/replies, xml ) | Need Help?? |
Firstly…
Whaaaaat?!?! One of my modules is referenced by the core Perl documentation? How did that happen?! Secondly, the Moose example could be simplified quite a bit. I feel you're making it deliberately verbose by not using sub signatures for example.
Still more verbose than your proposed syntax, but not as bad as it was. Also, if you used Moo, you could avoid the make_immutable stuff because the constructor automatically immutablizes the class the first time it gets called. To be honest, Moose seems verbose because this is such a simple class. It means that boilerplate imports and stuff starts taking up a significant portion of the class. In a longer class with more methods, the difference would be a lot less pronounced. I'mma give a Mew example because Mew is kinda cool.
In Section
Meditations
|
|