in reply to Re: Object passing within a package
in thread Object passing within a package

Or
$FooObj->barsub();

Replies are listed 'Best First'.
Re^3: Object passing within a package
by dragonchild (Archbishop) on Jan 17, 2005 at 16:46 UTC
    You're assuming that barsub() is a method within the Some::Module package. It could just be a regular function that takes, as its first argument, a Some::Module object or a reference to a data structure that $FooObj is blessed into.

    The moral of the story is that TMTOWTDI really means "Assuming will make an ASS out of U and ME."

    Being right, does not endow the right to be rude; politeness costs nothing.
    Being unknowing, is not the same as being stupid.
    Expressing a contrary opinion, whether to the individual or the group, is more often a sign of deeper thought than of cantankerous belligerence.
    Do not mistake your goals as the only goals; your opinion as the only opinion; your confidence as correctness. Saying you know better is not the same as explaining you know better.