Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re^6: Qualified package variable access ( private methods )by LanX (Saint) |
on Dec 21, 2020 at 20:36 UTC ( [id://11125564]=note: print w/replies, xml ) | Need Help?? |
> But you can't, of course, because $n is out of scope at that point. It is not a member of the "class". I was aware of the scoping/closure effect, but I very rarely see Perl code where class definitions are dispersed over more the one file. I.O.W file scope is sufficient. And I think we aggree that Perl allows so many kinds of introspection (e.g. PadWalker) that privacy becomes relative.
Cheers Rolf
In Section
Seekers of Perl Wisdom
|
|