The stupid question is the question not asked | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
threads::shared has no effect on variables, package or otherwise. The question is really whether you can make a shared package variable. share doesn't say it only works on lexical variables. Let's try it to confirm:
So yes, you can. Sharing adds magic to a variable, and thread cloning handles variables with this magic specially. It doesn't care whether the variable is accessible via the symbol table (package variable), via a function's pad (lexical variable), both or neither. In reply to Re: Sharing Package variables across threads
by ikegami
|
|