Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Re: Objects with Private Variables

by diotalevi (Canon)
on Mar 30, 2003 at 17:10 UTC ( #246750=note: print w/ replies, xml ) Need Help??


in reply to Re: Objects with Private Variables
in thread Objects with Private Variables

You missed the key point - the anonymous subroutine is a closure because it "captures" the $type, $class and $self instances. So when you call the function later the $self variable is still accessible from inside $closure thus it all works.


Comment on Re: Re: Objects with Private Variables

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (14)
As of 2014-09-19 19:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (144 votes), past polls