Keep It Simple, Stupid | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Thanks Adam,
Yes, local would probably be the trick, but I don't have that luxury. This thing is supposed to plug into a lot of existing code that uses "my" variables. It will work if I eval the manufactured sub each time, I was just trying to find a way around that because it is such a performance hit. I'm becoming convinced that what I want to do is impossible, and for all I know, it's impossible for a good reason :-) From what I've been reading, the "my" variables live on what is known as a "scratchpad", what I was looking for was a way for the manufactured sub to get access to that scratchpad. Of course the scratchpad changes each time the parent sub is called, so the pointer to it in the manufactured sub would have to change with each invocation. I wonder if the rfc period for perl 6 is closed :-) Hopefully merlyn will chime in here and tell me why it's such a bad idea to try and do what I am trying to do, because there is probably a good reason not to allow it, I just don't know what that is yet. :-) In reply to Re: access to my variables from other subs
by joe
|
|