in reply to Invoking method in another package

It is essentially equal to:
Barfoo::thisone($fb);
Changing the call to that, and changing the name of the variable $self to something like $object won't change anything, but will make the code more readable, as well as making your intent more clear.

To me it seems you want a class method (as opposed to object method), or call it a function, that gets some information out of an object.

Does it need to be a real object at all? A hashref

$fb = { cow => 'moo' };
would give the same result if you don't need more stuff (like methods) inside Foobar.


You have moved into a dark place.
It is pitch black. You are likely to be eaten by a grue.