my $parent = Obj->new; my $sub_obj_1 = $parent->build; my $sub_obj_2 = $parent->build; for (@{ $parent->{sub_objects} }){ print $_->name . "\n"; }