in reply to On Perl Objects!

A constructor is something that allocates a new object and returns a reference to it. If your "new" returns three (references to) objects, it is more like a factory, although since it didn't delegate the actual construction to anyone, it also includes the constructor. Confusing? Good, because this is not how you'd usually want to do this. :-)

As have already figured out in your Q5, what you usually want to do is create something that contains three objects. Very typically this is a hash in Perl, especially if each element object fulfills a role. So Human->new() may call Arm->new() and Leg->new() twice each; and put the resulting members in its fresh new $self->{right_arm}, $self->{left_arm}, $self->{right_leg}, and $self->{left_leg}.

You would then access the nested objects via indirection, which is a bit slower but not significantly so for most purposes. For example:

$person = Human->new(); $person->{right_arm}->grasp("banana"); # not through accessor $person->get_right_arm->grasp("banana"); # through accessor # or, you might write accessors like this too if you think they'd be u +seful: $person->arm("left")->grasp("orange");

What you should write depends on what you really need. What do your objects represent?