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

Re^3: How to avoid closures and memory leaks.

by Corion (Patriarch)
on Oct 18, 2014 at 15:32 UTC ( [id://1104238]=note: print w/replies, xml ) Need Help??


in reply to Re^2: How to avoid closures and memory leaks.
in thread How to avoid closures and memory leaks.

This is less an issue of closures and more an issue of you not understanding the difference between global variables (use vars) and lexical variables (my). See Coping With Scoping for a good explanation of these things.

Basically, what you declare with use vars are global variable names, and these have no issues with closures, because anyone can get at a global variable as long as they know the name.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2024-04-18 04:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found