How to (continue) learn Moose for using it "fairly" well? [closed]
Asked Answered
P

3

15

Although I am not a Perl guru, I use Perl and I can write object-oriented programs the "good old" way.

Now I would like to learn Moose. I've already (so-as) chewed the basic documentation, and my first Moose and roles are already working, but I'm miles away from understanding how Moose actually works.

Question 1: Is it absolutely necessary to understand how Moose works to write "pretty good" programs?

Honestly, I don't quite understand the old object system. Something I vaguely remember reading is that it's actually a reference to a data structure, but I never explored deeper. It was sufficient for me to know how and when I needed to use bless, autoload etc. and things simply worked. Maybe some of my old modules can be written more effectively. But for me, they work and work well.

Is this similar to Moose? Or does someone writing "enough-good" programs with Moose need to understand how it works "inside"?

The question arises for the following reasons:

In the METACPAN are dozens of modules that help write Moose objects even more easier and simpler.

Examples at random:

and many-many more (don't want cite here another 10-20 modules)

And now the main question:

Are there any good books with the instructions, examples and recommendations (good practices) for:

  • what from the above listed modules are recommended to use routinely from the start?

The above modules were surely not developed only because the author just hasn't what to do. Certainly they are useful and helpful. But learning (read: trying to understand) tens of many different modules (especially those who play with Moose internals) is an extremely long process. On the other hand, if they are not used, my programs will be unnecessarily complicated, and I will be dealing with things already resolved.

Moose should be (and probably is) a revolutionary system. Only I'm starting getting lost.

Edit: I just found Reindeer. Probably this module is a partial answer to the question: what modules are useful to use from the start (or most of time)

PS: I'm not sure than this question is ok for SO. If not, please move it to somewhere or close it. I asked it here because the SO-perl community is a really helpful place, and I don't know how to continue to learn Moose.

Pulsation answered 23/9, 2012 at 11:38 Comment(0)
R
5

Ricardo Signes's "Moose is Perl: A Guide to the New Revolution" contains a lot of valuable information and advice. Grab the PDF here: http://rjbs.manxome.org/talks/moose/

Rocambole answered 24/9, 2012 at 2:27 Comment(2)
Wow! This is "THE presentetion". Thank you. Really good, and slightly touching the MooseX too. Know you more like this - especially what are dealing with the MooseX - extensions?Pulsation
This presentation has 616 slides! My issue is dated from July 12, 2012. Discussion of "MooseX::" stuff starts at Slide 532.Valorievalorization
C
4

To answer your first question: Not knowing how things work inside is the whole point of abstraction. While knowing the insides sometimes gives you better idea why things work the way they do (and more so with something as complex as Moose), you can write code just fine without it. When you run into a problem, you may dive a bit deeper to understand what’s wrong.

The second question, how to learn Moose, is really not a good fit for Stack Overflow.

Cogen answered 23/9, 2012 at 12:8 Comment(0)
L
2

Google "The Moose is Flying". You will find all you need there

Langford answered 23/9, 2012 at 13:18 Comment(1)
Thank you. I was quick scan the both parts, and those are about the basics. As I told in the question, I'm (hopefully) already done with this. My problem is the many-many "extenstions" - what one are usefull to use right from the "beginning". Thank you anyway for the suggestion.Pulsation

© 2022 - 2024 — McMap. All rights reserved.