Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
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 having an uproarious good time at the Monastery: (9)
As of 2014-11-26 08:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (165 votes), past polls