in reply to Same object, different packages

I'm hopeing there is a practical means of having the main program and GMS::MemberFile share the same object with minimal programmer-side intervention.

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
    To be more specific - there is no such thing as a sub-module, save in convention. Modules ABC and ABC::DEF have no relationship other than the following:
    1. The files live in relatively similiar directory structures.
    2. The programmer has a mental picture that they're related
    Perl doesn't make any package relationships for you.

    ------
    We are the carpenters and bricklayers of the Information Age.

    Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.