in reply to Same object, different packages
This is possible.
Nothing prevents you from either passing some instance $x of class X as an argument when tying a scalar to class Y, or tying a hash that contains a reference to $x. You can still hold on to $x, as can the tied scalar. It's up to you, though to ensure that $x's state remains valid if it is access both directly and through the tie API, and are side-effecting $x through both.
It doesn't matter at all whether Y is a submodule of X.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re2: Same object, different packages
by dragonchild (Archbishop) on Sep 19, 2001 at 16:41 UTC |