laziness, impatience, and hubris | |
PerlMonks |
Re^2: Real life uses for closures. (real life?)by LanX (Saint) |
on Feb 12, 2013 at 17:45 UTC ( [id://1018419]=note: print w/replies, xml ) | Need Help?? |
> (EDIT: Applied in Perl OO one gets private class-variables in package scope instead of public package variables!) lets elaborate, in the following code you can see a simplified standard Perl class with private and public variables and methods. The private data is only visible and accessible within the methods because of Perl's closure mechanism.
prints
So, does this count as real life example?
Cheers Rolf
In Section
Seekers of Perl Wisdom
|
|