in reply to Invoking method in another package

There isn't anything wrong with it technically, but there are some style issues here. You are essentially using a Barfoo class as a temporary variable for the Foobar class, and then calling a function within that class. This is not that unusual within other Object Oriented languages, but because of the weird syntax to do it within Perl, its probably not the best thing to do. I think chromatic's suggestions above is probable the best way to do it.