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.
In reply to Re: Same object, different packages
by dws
in thread Same object, different packages
by Flame
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |