in reply to Re: Invoking method in another package
in thread Invoking method in another package

What I'm trying to do is just pass the blessed hash reference along to Barfoo::thisone so I can rip values from it. Maybe I'm just better off using global variables :|

Replies are listed 'Best First'.
Re: Re: Re: Invoking method in another package
by diotalevi (Canon) on Sep 30, 2002 at 01:19 UTC

    Oh ok, I can understand that. I've been writing code in a similar vein except mine steals lexical variables. If you want to steal variables out of a blessed something then what you originally wrote is perfectly fine - you might want to see about importing that thisone() method or name it something that indicates it's integrity violating nature. So what your call to Foobar::thisone($obj) is semantically equivalent to thisone($obj) except that one version leaves the method off in the original package. If you look at my signature you'll see an example of a something being violated in the exact same way. I leave the B::svref_2object method over there since I didn't feel like importing it into the current scope. At that point it becomes preference and style.