Help for this page

Select Code to Download


  1. or download this
    going in
    in new for cChild and just calling sub_passed_to_child
    yes in passed_sub
    $oParent_ref is cParent=HASH(0xf18038)
    $oParent_ref->{test_att} is 3
    
  2. or download this
         ##OLD  $self->{sub_passed_to_child}( $self->{parent_obj_ref} );
              $self->{sub_passed_to_child}->( $self ); ##New, explicitly d
    +e-ref the sub
    
  3. or download this
       sub passed_sub {
        print "yes in passed_sub\n";
        my ($child) = @_; # I don't like using shift here..
        print $child->{parent_obj_ref}{test_att}; # 3