in reply to Re^3: OO Conversion Query - Sharing Data
in thread OO Conversion Query - Sharing Data

Wait a sec, bless, which I'm already using, doesn't solve the problem. To recap..

parent calls child1 which returns something, which is stored on parent.

parent calls child2 which needs data held on parent.

***

The solutions thus far are;

a) pass a reference to the parent when calling the child.

Is there a simpler way to get at the parent?

  • Comment on Re^4: OO Conversion Query - Sharing Data

Replies are listed 'Best First'.
Re^5: OO Conversion Query - Sharing Data
by Anonymous Monk on Apr 14, 2013 at 11:26 UTC
    Finally nailed it. I have another module that loads all the common functions (still one function per pm file), instantiating a copy into $parent, passing $parent when it does and then each common function saves the $parent value to $self.

    That should be the logical way to do it, since I'm passing $parent on each call. The only other way would be if I could use a command to get/call the parent from the child instantiations.