[Chicago-talk] calling functions in a package by its name
brian d foy
brian.d.foy at gmail.com
Fri Jan 18 01:27:12 PST 2008
On 1/16/08, Jonathan Rockway <jon at jrock.us> wrote:
> First off %secretStuff isn't secret, it's a package variable. That
> means it's global and anyone can get at it with %
> MysteryClass::secretStuff. "my" can be package-scoped; use that
> instead.
my() isn't package scoped. That's the point of my; it's not something
the package tracks. Also, "package" doesnt' create a scope.
You can fake private class variables with my() variables by only
having one package per file. In that case, it's the file scope that
limits the my().
--
brian d foy <brian.d.foy at gmail.com>
http://www.pair.com/~comdog/
More information about the Chicago-talk
mailing list