Yes, your code is pretty much identical to what I ended up using to get past that particular problem.
Specifically, what I'm trying to write is a Curses::UI interface to a sort of psuedo-autodiscovery script. I was attempting to figure out how to pass the Curses::UI objects around without declaring full-blown globals. I'm also trying to write it in such a way that it could potentially interface with a different autodiscover script.
So essentially I have MyModule, MyModule::Interface::CLI, and MyModule::Autodiscover. I wanted to contain all the C::UI stuff in M::I::CLI, which is why I was trying to pass those C::UI objects to different subs within the M::I::CLI package. If I'm poorly reinventing a wheel, I certainly welcome input.
And yes, I do spend too much time monkeying with RT.
--
"This alcoholism thing, I think it's just clever propaganda produced by people who want you to buy more bottled water." -- pedestrianwolf
In reply to Re^2: Object passing within a package
by naChoZ
in thread Object passing within a package
by naChoZ
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |