Help for this page

Select Code to Download


  1. or download this
    sub new {
        return bless {}, shift;
    ...
        push @{ $self->{sub_objects} }, $sub_obj;
        return $sub_obj;
    }
    
  2. or download this
    my $parent = Obj->new;
    my $sub_obj_1 = $parent->build;
    ...
    for (@{ $parent->{sub_objects} }){
        print $_->name . "\n";
    }