Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: What is a "stash"?

by htoug (Deacon)
on Feb 06, 2003 at 11:38 UTC ( [id://233110]=note: print w/replies, xml ) Need Help??


in reply to What is a "stash"?

A reasonable guess: "When you return an object the entire stash that the object is in is blessed as well"
Googling a but led me to Change 18424 in the Perl source, where it is stated that it "Fixes bug #15273, the return of the object caused the stash of the object to be cloned, cloning the entire syntax tree and all lexicals in there creating danglning copies to the object. (Pararell but unlinked STASH tree). This adds a new flag, when set it will use STASHES from the thread we are joining into avoiding the problem."
Not that this will explain it any further, but as far as I can understand, it means that when you return a variable from one thread to another, the the entire stash (read package) is made available to the other thread. Note this guess could be most amazingly and stupidly wrong so YMMV. It is obviously in the deep magic area. I think you have (at least) these options:
  • don your wizards hat and read the code
  • mail Arthur "Sky" Bergman and ask him
  • never mind and go on as before
Henrik Tougaard: Not an internals wizard, but I have been in there and got out again nearly unscathed.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://233110]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2024-04-25 17:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found