In your package foo above, my inclination would be to declare 'my $bar;' at the top, before the first sub, and simply refer to it as '$bar', if there were no need for users in other packages to access it.
In retrospect, I think using getters and setters is probably better than exposing variables.
Thanks for your efforts to clear this up for me.
In reply to Re^4: Unclear about 'our'
by ibm1620
in thread Unclear about 'our'
by ibm1620
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |