http://www.perlmonks.org?node_id=697947


in reply to Help!!!! POOP is confusing me!

Since you are just starting out with Perl and are unspoiled from the old ways of doing OOP in Perl, I would strongly suggest to use the IMHO best way of OO in Perl 5.x, namely Moose and forget about the others for the time being. It is much cleaner and easier to understand and you don't have to handle hashes or other data structures to represent your objects.

That being said, your code won't run as it stands, there are many compilation errors because of undefined symbols, a non-matched closing bracket and barewords "self" and "tempBirds".

I cannot understand exactly what your problem is. Can you please get your code into a runnable state. Then I will have a chance to analyze the real issue.

Replies are listed 'Best First'.
Re^2: Help!!!! POOP is confusing me!
by amarquis (Curate) on Jul 16, 2008 at 13:17 UTC

    I'd simply lay off OOP for a while until some mastery of the fundamentals - sigils, references, etc. - is gained. I think once one gets to that point, to move on to perldoc perltoot rather than Moose.

    Moose is great and everything, but one has to eventually be spoiled by the "old ways" if you are ever going to understand most existing code. Beyond that, once you've got a good hold on references I think the old school object implementation has pretty low overhead to learn.

      You are right, of course those basics should come first. I just thought, maybe bittis' main motivation is to evaluate how OOP can be done with Perl, so I threw in the reference to Moose to show him a nice way to do it.